Replies: 1 comment
-
|
It is not a good choice to use the throw helper in such case. The exception |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
code:
if (depth > 0) throw new ParserException("Comment tag is not closed");we can't replace it with
ArgumentOutOfRangeException.ThrowIfGreaterThan(depth, 0, nameof(depth));because useful information for user/log (Comment tag is not closed) is not added and depth doesn't say a thing here.
would be nice if we could give reasons to the exception throw helpers.
Or is there a reason this is not added?
Beta Was this translation helpful? Give feedback.
All reactions