Mega Code Archive

 
Categories / Java Book / 001 Language Basics
 

0099 Exception Types

The following disgram shows the Java exception type hierarchy: Throwable | | +---Exception. | | | | | +--- RuntimeException +---Error Exception and its subclasses are used for exceptional conditions that user programs should catch. You can subclass Exception to create your own custom exception types. Error defines exceptions that are not expected to be caught under normal circumstances. Java run-time system use Error to indicate errors in the run-time environment. Stack overflow is an example of such an error.