File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change 88using RabbitMQ . Client . Exceptions ;
99using RawRabbit . Channel . Abstraction ;
1010using RawRabbit . Configuration ;
11+ using RawRabbit . Exceptions ;
1112using RawRabbit . Logging ;
1213
1314namespace RawRabbit . Channel
@@ -208,7 +209,7 @@ private void EnsureRequestsAreHandled()
208209 var isRecoverable = _channels . Any ( c => c is IRecoverable ) ;
209210 if ( ! isRecoverable )
210211 {
211- throw new Exception ( "Unable to retreive channel. All existing channels are closed and none of them are recoverable." ) ;
212+ throw new ChannelAvailabilityException ( "Unable to retreive channel. All existing channels are closed and none of them are recoverable." ) ;
212213 }
213214
214215 _logger . LogInformation ( "Unable to find an open channel. Requeue TaskCompletionSource for future process and abort execution." ) ;
Original file line number Diff line number Diff line change 1+ using System ;
2+
3+ namespace RawRabbit . Exceptions
4+ {
5+ public class ChannelAvailabilityException : Exception
6+ {
7+ public ChannelAvailabilityException ( string message ) : base ( message )
8+ { }
9+ }
10+ }
You can’t perform that action at this time.
0 commit comments