You are viewing a single comment's thread. Return to all comments →
Fine, but what's the point of showing an exception message in a different way than the other? If you use that, it will give you an error when in the division by zero test case.
Why one exception should show the extra content and the other not? This is not even part of the exercise.
What they could do if they really want a nice representation of the exceptions, could be we print something like "This is an input mismatch exception" and "This is an arithmetic exception".
This would force people to know which exceptions could happen and don't use the generic Exception.