Throwable
is the super class of Error
& Exception
.
Like Exception
, Error
too, can be thrown & handled.
But it is not advisable, according to the following doc:
You are not required to catch Error objects or Error subtypes. You can
also throw an Error yourself (although other than AssertionError you
probably won't ever want to), and you can catch one, but again, you
probably won't. What, for example, would you actually do if you got an
OutOfMemoryError?
Keeping this concept in mind, I would suggest to extend Throwable
if you want to throw and/or catch Exception
& Error
both. Extend Exception
if you want to throw and/or catch Exception
only.