11.1. The Kinds and Causes of Exceptions
11.1.1. The Kinds of Exceptions
An exception is represented by an instance of the class Throwable
(a direct subclass of Object
) or one of its subclasses.
Throwable
and all its subclasses are, collectively, the exception classes.
Note that a subclass of Throwable
must not be generic (§8.1.2).
The classes Exception
and Error
are direct subclasses of Throwable
.
Exception
is the superclass of all the exceptions from which ordinary programs may wish to recover.
Error
is the superclass of all the exceptions from which ordinary programs are not ordinarily expected to recover.
Error
and all its subclasses are, collectively, the error classes.
The class Error
is a separate subclass of Throwable
, distinct from ...
Get The Java® Language Specification, Java SE 7 Edition, Fourth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.