Title: Exception Hierarchy and Strategy
Course: CPS 161: An Intro to Programming with Java - DL MM MASTER > Section: Learning Units - Bb

Presentations and Videos

- Exception Heirarchy and Strategy lecture video (Time: 47:50)
- Exception Heirarchy and Strategy document

- Class Heirarchy: Throwable, Exception, RuntimeException, etc.
- Unchecked Exceptions (those derived from RuntimeException), versus Checked Exception (not derived from RuntimeException).
- Example to demonstrate 3 Exception handling philosophies (there are other approaches as well)
  - "Evel Knievel" programming style (ignore Exceptions)
  - Global Handling of Exceptions
  - Local Handling of Exceptions to collect more information, but pass the error on to more global routines
  - Local Handling of Exceptions to try to recover from the error locally in order to continue excecuting
- Methods available in the Throwable class (and availabe to all Exceptions classes)
  - getMessage, toString - to print out the error
  - printStackTrace(), printStackTrace(System.out) - to dump the program locations to the standard error stream or the standard system out stream