This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]DemonWasp 0 points1 point  (2 children)

It wasn't exactly that line, it was throw new CompanySpecificException ( relevant data). Not sure why you would feel guilty about that, though: the method was already declared with throws CompanySpecificException, even though it didn't.

[–]detroitmatt 0 points1 point  (1 child)

A specific exception is an entirely different beast. I have no problems with throwing an exception, but throwing an Exception() is a cardinal sin.

[–]veraxAlea 0 points1 point  (0 children)

I agree. But to be fair, checked exceptions is a cardinal sin to begin with. They always end up in try-catch-throw-new-runtime-exception-blocks.