Section 11.5 Java Exception Hierarchy
• All Java exception classes inherit directly or indirectly from class Exception
.
• Programmers can extend the Java exception hierarchy with their own exception classes.
• Class Throwable
is the superclass of class Exception
and is therefore also the superclass of all exceptions. Only Throwable
objects can be used with the exception-handling mechanism.
• Class Throwable
(p. 451) has two subclasses: Exception
and Error
.
• Class Exception
and its subclasses represent problems that could occur in a Java program and be caught by the application.
• Class Error
and its subclasses represent problems that could happen in the Java runtime system. Error
s happen infrequently and typically should not be caught by an ...
Get Java™ How To Program (Early Objects), Tenth 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.