-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[API Implementation]: Expose CookieException constructors #109026
base: main
Are you sure you want to change the base?
Conversation
Note regarding the
|
1 similar comment
Note regarding the
|
var exception = new CookieException(message, inner); | ||
|
||
Assert.Equal(message, exception.Message); | ||
Assert.Equal(inner, exception.InnerException); |
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.
Assert.Equal(inner, exception.InnerException); | |
Assert.Same(inner, exception.InnerException); |
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.
There would be no difference in result, if I use Same.
Exception
is an reference type with no Equals
overload, so it already compares the reference.
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.
Thanks
/// <remarks> | ||
/// The value of <paramref name="message"/> is stored in the <see cref="Exception.Message"/> property of the new instance. | ||
/// </remarks> |
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.
/// <remarks> | |
/// The value of <paramref name="message"/> is stored in the <see cref="Exception.Message"/> property of the new instance. | |
/// </remarks> |
/// and a reference to the inner exception that is the cause of this exception. | ||
/// </summary> | ||
/// <param name="message">A <see cref="string"/> that describes the error that occurred.</param> | ||
/// <param name="innerException">A nested <see cref="Exception"/>.</param> |
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.
/// <param name="innerException">A nested <see cref="Exception"/>.</param> | |
/// <param name="innerException">The exception that is the cause of the current exception.</param> |
/// <remarks> | ||
/// The value of <paramref name="message"/> is stored in the <see cref="Exception.Message"/> property of the new instance. | ||
/// The value of <paramref name="message"/> is stored in the <see cref="Exception.InnerException"/> property of the new instance. | ||
/// </remarks> |
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.
/// <remarks> | |
/// The value of <paramref name="message"/> is stored in the <see cref="Exception.Message"/> property of the new instance. | |
/// The value of <paramref name="message"/> is stored in the <see cref="Exception.InnerException"/> property of the new instance. | |
/// </remarks> |
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 think you'll have to include a reference to the new file in the test csproj
.
This PR implements and fixes #95965.
Potentially breaking change if somebody does reflection hacks:
inner
toinnerException
as defined in the approved API scheme.Added APIs