File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
projects/client/RabbitMQ.Client/src/client/exceptions Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,6 @@ public class AlreadyClosedException: OperationInterruptedException
49
49
///<summary>Construct an instance containing the given
50
50
///shutdown reason.</summary>
51
51
public AlreadyClosedException ( ShutdownEventArgs reason )
52
- : base ( reason ) { }
52
+ : base ( reason , "Already closed" ) { }
53
53
}
54
54
}
Original file line number Diff line number Diff line change @@ -81,6 +81,16 @@ public OperationInterruptedException(ShutdownEventArgs reason)
81
81
m_shutdownReason = reason ;
82
82
}
83
83
84
+ ///<summary>Construct an OperationInterruptedException with
85
+ ///the passed-in explanation and prefix, if any.</summary>
86
+ public OperationInterruptedException ( ShutdownEventArgs reason , String prefix )
87
+ : base ( reason == null ? ( prefix + ": The AMQP operation was interrupted" ) :
88
+ string . Format ( "{0}: The AMQP operation was interrupted: {1}" ,
89
+ prefix , reason ) )
90
+ {
91
+ m_shutdownReason = reason ;
92
+ }
93
+
84
94
///<summary>Retrieves the explanation for the shutdown. May
85
95
///return null if no explanation is available.</summary>
86
96
public ShutdownEventArgs ShutdownReason { get { return m_shutdownReason ; } }
You can’t perform that action at this time.
0 commit comments