-
Notifications
You must be signed in to change notification settings - Fork 49
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
Consider more specific exceptions for validation methods #76
Comments
v8 Breaking change |
Not really sure I see the value in adding custom exception types. What will you do with the extra information lying in dedicated properties? |
The benefit would be in providing more information upstream about the failure - most of the top nuget packages provide custom exception types since c# unlike java does not provide a super rich set of exceptions. A couple uses I can see:
All in all these aren’t :vital: and are rather edge cases but if we are throwing anyway I’d rather take an “enterprise” style approach and support as many use cases as possible (where supporting those cases does not add substantial work at least) |
|
Agreed I do not think it would be breaking (except if someone expected
EXACTLY that type of exception, in which case they were probably doing
silly things anyway :) )
…On Wed, Feb 14, 2018 at 12:38 PM Daniel Wertheim ***@***.***> wrote:
v8.0.0 is going out nowish, but this isn't really breaking as I see it as
it would still be able to extend the current exceptions being thrown in the
specific cases. If so, then it can be added whenever.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#76 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AKRxOktV41YwYMjgDAlal92xEj8sqc3Qks5tU0QzgaJpZM4QzfNT>
.
|
It looks like you were okay with the proposal above. I will consider this item unblocked (this is my non-committal way of saying I'll work on it) |
E.g. ArgumentNotLessThanException with fields that expose the actual value and the validated against value.
The text was updated successfully, but these errors were encountered: