D’s basic exception hierarchy (Figure 9.1 on the facing page) is simple.
Figure 9.1. Regular exceptions inherit the Exception class and therefore can be caught with catch (Exception). The Error class inherits class Throwable directly. Normal code should catch only Exception and its descendants—the others are meant to assure orderly shutdown when an error is found in the logic of the program.
You are currently reading a PREVIEW of this book.
Get instant access to over
$1 million worth of books and videos.