next up previous
Next: How to handle exceptions Up: Unit 10 Previous: Handling errors during the

The hierarchy of exceptions

Exceptions and errors are represented through Java classes and they are organized in a hierarchy.

The class Throwable is the superclass of all types of errors and of all exceptions. Errors represent events that cannot be controlled by the programmer (for example, OutOfMemoryError), while exceptions can be handled during the execution of the program.

Note: In this figure, dashed lines represent an indirect inheritance relation.


next up previous
Next: How to handle exceptions Up: Unit 10 Previous: Handling errors during the