Skip to content
Discussion options

You must be logged in to vote

It is not a good choice to use the throw helper in such case. The exception ArgumentOutOfRangeException is for argument, which means the reason should be an input argument of a method is in correct. In this case, the called method and argument name is almost the whole reason.
It should not be used for representing bad state after doing complex logic. A different exception type like ParseException should be used instead.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by wstaelens
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
3 participants