Skip to content

Commit d4cf317

Browse files
committed
Use optional parameter in SniErrorDetails constructor
1 parent 464e94f commit d4cf317

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserStateObject.cs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ internal readonly struct SniErrorDetails
6262
public readonly string Function;
6363
public readonly Exception Exception;
6464

65-
internal SniErrorDetails(string errorMessage, uint nativeError, uint sniErrorNumber, int provider, uint lineNumber, string function, Exception exception)
65+
internal SniErrorDetails(string errorMessage, uint nativeError, uint sniErrorNumber, int provider, uint lineNumber, string function, Exception exception = null)
6666
{
6767
ErrorMessage = errorMessage;
6868
NativeError = nativeError;
@@ -72,16 +72,6 @@ internal SniErrorDetails(string errorMessage, uint nativeError, uint sniErrorNum
7272
Function = function;
7373
Exception = exception;
7474
}
75-
76-
internal SniErrorDetails(string errorMessage, uint nativeError, uint sniErrorNumber, int provider, uint lineNumber, string function)
77-
{
78-
ErrorMessage = errorMessage;
79-
NativeError = nativeError;
80-
SniErrorNumber = sniErrorNumber;
81-
Provider = provider;
82-
LineNumber = lineNumber;
83-
Function = function;
84-
}
8575
}
8676

8777
private sealed class TimeoutState

0 commit comments

Comments
 (0)