@@ -57,10 +57,25 @@ public ShutdownSignalException(boolean hardError,
5757 boolean initiatedByApplication ,
5858 Method reason , Object ref )
5959 {
60- super ((initiatedByApplication
61- ? ("clean " + (hardError ? "connection" : "channel" ) + " shutdown" )
62- : ((hardError ? "connection" : "channel" ) + " error" ))
63- + "; reason: " + reason );
60+ this (hardError , initiatedByApplication , reason , ref , "" );
61+ }
62+
63+ /**
64+ * Construct a ShutdownSignalException from the arguments.
65+ * @param hardError the relevant hard error
66+ * @param initiatedByApplication if the shutdown was client-initiated
67+ * @param reason AMQP method describing the exception reason
68+ * @param ref Reference to Connection or Channel that fired the signal
69+ * @param messagePrefix prefix to add to exception message
70+ */
71+ public ShutdownSignalException (boolean hardError ,
72+ boolean initiatedByApplication ,
73+ Method reason , Object ref , String messagePrefix )
74+ {
75+ super (messagePrefix + (initiatedByApplication
76+ ? ("clean " + (hardError ? "connection" : "channel" ) + " shutdown" )
77+ : ((hardError ? "connection" : "channel" ) + " error" ))
78+ + "; reason: " + reason );
6479 this ._hardError = hardError ;
6580 this ._initiatedByApplication = initiatedByApplication ;
6681 this ._reason = reason ;
0 commit comments