-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix incorrect exception argument in DbConnectionOptions #98826
Conversation
@@ -190,7 +190,7 @@ internal static void ValidateKeyValuePair(string keyword, string value) | |||
} | |||
if ((null != value) && value.Contains('\0')) | |||
{ | |||
throw ADP.InvalidValue(keyword); | |||
throw ADP.InvalidValue(value); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, why does this need to change to value? The argument here is the parameter name, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am actually considering that it should be nameof(value)
. It's expecting the parameter name, returning an ArgumentException
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless you mean that the value of keyword should be the parameter name since it's triggered when setting the indexer and it is meant to show this as the source
https://source.dot.net/#System.Data.Common/System/Data/Common/DbConnectionStringBuilder.cs,98
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless you mean that the value of keyword should be the parameter name since it's triggered when setting the indexer and it is meant to show this as the source
https://source.dot.net/#System.Data.Common/System/Data/Common/DbConnectionStringBuilder.cs,98
Right, I suspect that was the original intent.
No description provided.