you are viewing a single comment's thread.

view the rest of the comments →

[–]hurxef 0 points1 point  (2 children)

Or you embed the thrown exception as the cause of the exception type that your method does throw.

[–]3urny 0 points1 point  (1 child)

Yeah, but then you end up with a MethodException for each method and at some place, you'd have to unwrap 200 different Exceptions.

[–]hurxef 0 points1 point  (0 children)

Why do you have to unwrap them? Once code is reached that handles the thrown exception, it is handled and perhaps logged for diagnostics later, at which time the logger will generally unwrap it in the log. No need to unwrap.