Java Arena

Module 42

Exceptions

Exceptions, and what a program can do about them. Reading a crash, catching an exception with try and catch, several catch blocks and finally, checked and unchecked exceptions and throws, try-with-resources, throwing an IllegalArgumentException to refuse bad parameters, exceptions in interfaces, and an exception's message and stack trace. MOOC section 11.3.

Steps

  1. Catching an exception: try and catch
  2. Choosing what to catch
  3. Checked exceptions and throws
  4. Exceptions and resources
  5. Throwing an exception
  6. Exceptions and interfaces
  7. The details of an exception