When should Throwable be used instead of new Exception?

Always throw an Exception (never a Throwable). You generally don’t catch Throwable either, but you can. Throwable is the superclass to Exception and Error, so you would catch Throwable if you wanted to not only catch Exceptions but Errors, that’s the point in having it. The thing is, Errors are generally things which a normal application wouldn’t and shouldn’t catch, so just use Exception unless you have a specific reason to use Throwable.

Leave a Comment