File tree Expand file tree Collapse file tree 3 files changed +5
-6
lines changed
RabbitMQ.Client/src/client Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 55
55
//
56
56
//---------------------------------------------------------------------------
57
57
using System ;
58
- using System . Security . Authentication ;
59
58
60
59
namespace RabbitMQ . Client . Exceptions
61
60
{
62
61
/// <summary> Thrown when the likely cause is an
63
62
/// authentication failure. </summary>
64
- public class ConnectionException : InvalidCredentialException
63
+ public class PossibleAuthenticationFailureException : Exception
65
64
{
66
- public ConnectionException ( String msg , Exception inner )
65
+ public PossibleAuthenticationFailureException ( String msg , Exception inner )
67
66
: base ( msg , inner )
68
67
{
69
68
}
Original file line number Diff line number Diff line change @@ -999,7 +999,7 @@ public void Open(bool insist)
999
999
}
1000
1000
catch ( OperationInterruptedException e )
1001
1001
{
1002
- throw new ConnectionException ( "Likely authentication failure during connection start ", e ) ;
1002
+ throw new PossibleAuthenticationFailureException ( "Possibly caused by authentication failure ", e ) ;
1003
1003
}
1004
1004
1005
1005
ushort channelMax = ( ushort ) NegotiatedMaxValue ( m_factory . RequestedChannelMax ,
Original file line number Diff line number Diff line change @@ -88,8 +88,8 @@ public void TestAuthFailure()
88
88
{
89
89
foreach ( Object failureReason in bue . ConnectionErrors . Values )
90
90
{
91
- Assert . IsInstanceOfType ( typeof ( ConnectionException ) , failureReason ) ;
92
- Assert . That ( ( ( ConnectionException ) failureReason ) . Message . ToLower ( ) . Contains ( "auth" ) ) ;
91
+ Assert . IsInstanceOfType ( typeof ( PossibleAuthenticationFailureException ) , failureReason ) ;
92
+ Assert . That ( ( ( PossibleAuthenticationFailureException ) failureReason ) . Message . ToLower ( ) . Contains ( "auth" ) ) ;
93
93
}
94
94
}
95
95
}
You can’t perform that action at this time.
0 commit comments