@@ -13,18 +13,13 @@ namespace SqlServerSimulator;
1313/// </summary>
1414internal sealed class SimulatedSqlException : DbException
1515{
16- internal SimulatedSqlException ( string ? message )
17- : this ( message , [ ] )
18- {
19- }
20-
2116 private SimulatedSqlException ( string message , int number , byte @class , byte state )
2217 : this ( message , new SimulatedSqlError ( message , number , @class , state ) )
2318 {
2419 }
2520
26- private SimulatedSqlException ( string ? message , params ReadOnlySpan < SimulatedSqlError > errors )
27- : base ( message ?? "Simulated exception with no message." )
21+ private SimulatedSqlException ( string message , params ReadOnlySpan < SimulatedSqlError > errors )
22+ : base ( message )
2823 {
2924 base . HResult = unchecked ( ( int ) 0x80131904 ) ;
3025 base . Source = "Core Microsoft SqlClient Data Provider" ;
@@ -106,6 +101,8 @@ internal static SimulatedSqlException ColumnReferenceNotAllowed(IEnumerable<stri
106101
107102 internal static SimulatedSqlException InvalidObjectName ( StringToken name ) => new ( $ "Invalid object name { name } .", 208 , 16 , 1 ) ;
108103
104+ internal static SimulatedSqlException MustDeclareScalarVariable ( string name ) => new ( $ "Must declare the scalar variable \" @{ name } \" .", 137 , 15 , 2 ) ;
105+
109106 internal static SimulatedSqlException SyntaxErrorNearKeyword ( ReservedKeyword token ) => new ( $ "Incorrect syntax near the keyword '{ token } '.", 156 , 15 , 1 ) ;
110107
111108 internal static SimulatedSqlException SyntaxErrorNear ( Token ? token ) => new ( $ "Incorrect syntax near '{ token } '.", 102 , 15 , 1 ) ;
0 commit comments