Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 834049b

Browse files
MarcoRossignolistephentoub
authored andcommitted
"Don't directly throw Exception" System.Data.SqlClient (#25542)
1 parent d2670c6 commit 834049b

File tree

1 file changed

+2
-2
lines changed
  • src/System.Data.SqlClient/src/System/Data/SqlClient/SNI

1 file changed

+2
-2
lines changed

src/System.Data.SqlClient/src/System/Data/SqlClient/SNI/SNIProxy.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,11 @@ public void GenSspiClientContext(SspiClientContextStatus sspiClientContextStatus
144144
// so we don't need to check for a GssApiException here.
145145
if (statusCode.ErrorCode == SecurityStatusPalErrorCode.InternalError)
146146
{
147-
throw new Exception(SQLMessage.KerberosTicketMissingError() + "\n" + statusCode);
147+
throw new InvalidOperationException(SQLMessage.KerberosTicketMissingError() + "\n" + statusCode);
148148
}
149149
else
150150
{
151-
throw new Exception(SQLMessage.SSPIGenerateError() + "\n" + statusCode);
151+
throw new InvalidOperationException(SQLMessage.SSPIGenerateError() + "\n" + statusCode);
152152
}
153153
}
154154
}

0 commit comments

Comments
 (0)