Skip to content

Commit 0275700

Browse files
committed
Better messages for out-of-range exceptions
1 parent 5890cd2 commit 0275700

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

Provider/src/FirebirdSql.Data.FirebirdClient/Client/Managed/GdsConnection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ public void Identify(string database)
193193
_authData = _sspi.GetClientSecurity(data);
194194
break;
195195
default:
196-
throw new ArgumentOutOfRangeException();
196+
throw new ArgumentOutOfRangeException(nameof(acceptPluginName), $"{nameof(acceptPluginName)}={acceptPluginName}");
197197
}
198198
}
199199
}

Provider/src/FirebirdSql.Data.FirebirdClient/FirebirdClient/FbParameter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public override int Size
7979
set
8080
{
8181
if (value < 0)
82-
throw new ArgumentOutOfRangeException("Size");
82+
throw new ArgumentOutOfRangeException();
8383

8484
_size = value;
8585

Provider/src/FirebirdSql.Data.FirebirdClient/Services/FbConfiguration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ byte FbShutdownOnlineModeToIscCode(FbShutdownOnlineMode mode)
209209
case FbShutdownOnlineMode.Full:
210210
return IscCodes.isc_spb_prp_sm_full;
211211
default:
212-
throw new ArgumentOutOfRangeException();
212+
throw new ArgumentOutOfRangeException(nameof(mode));
213213
}
214214
}
215215
}

Provider/src/FirebirdSql.EntityFrameworkCore.Firebird/Storage/Internal/FbDateTimeTypeMapping.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ protected override string SqlLiteralFormatString
5050
case FbDbType.Time:
5151
return "{0:HH:mm:ss}";
5252
default:
53-
throw new ArgumentOutOfRangeException();
53+
throw new ArgumentOutOfRangeException(nameof(_fbDbType), $"{nameof(_fbDbType)}={_fbDbType}");
5454
}
5555
}
5656
}

0 commit comments

Comments
 (0)