-
Notifications
You must be signed in to change notification settings - Fork 337
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
Changed message of exception to improve readability #1306
base: master
Are you sure you want to change the base?
Conversation
Hello @C0DK , |
Removed trailing whitespaces. remove extra whitespace Fixed failing tests
@aivascu Thank you. I never got around to answering you, but I've fixed the issues now. Love the framework, and felt like it was a good way to show it, by helping out a bit. I hope the PR doesn't break the SRP too much by both doing some boy scouting + proofreading. Luckily they are separate commits, and we can just drop some if you guys disagree. |
@aivascu do you have time to check this? :) |
"<null>", | ||
string.Format(CultureInfo.InvariantCulture, | ||
"Guard Clause prevented it, however the thrown exception contains invalid parameter name. " + | ||
"Ensure you pass correct parameter name to the ArgumentNullException constructor.{0}" + |
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.
Looks like this assertion will not report anymore the correct exception type. You might add the exception type as an argument for the exception factory. Looks like current tests did not assert this behavior. Could you add the appropriate tests?
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.
What wrong exception? I am not sure I follow.
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.
Hey - I don't mean to be an annoying "You have a error" because I make those all the time; I simply wanted to help.
I got the following exception from this great framework:
And realized it lacked an "a" between
So I wanted to fix those.
However, upon creating this pull request, my subscription to Grammarly proposed a few other changes, which I've added in a separate commit, which contains those changes.
After doing these changes I tried to live by the Boy Scout Rule, and DRY the creation of these exceptions, as well as implement it for EmptyGuid, which I realize didn't check param name.