Exception hierarchy

The exception tree is defined in the system module. Every exception inherits from system.Exception. Exceptions that indicate programming bugs inherit from system.Defect (which is a subtype of Exception) and are strictly speaking not catchable as they can also be mapped to an operation that terminates the whole process. If panics are turned into exceptions, these exceptions inherit from Defect.

Exceptions that indicate any other runtime error that can be caught inherit from system.CatchableError (which is a subtype of Exception).

  1. Exception
  2. |-- CatchableError
  3. | |-- IOError
  4. | | `-- EOFError
  5. | |-- OSError
  6. | |-- ResourceExhaustedError
  7. | `-- ValueError
  8. | `-- KeyError
  9. `-- Defect
  10. |-- AccessViolationDefect
  11. |-- ArithmeticDefect
  12. | |-- DivByZeroDefect
  13. | `-- OverflowDefect
  14. |-- AssertionDefect
  15. |-- DeadThreadDefect
  16. |-- FieldDefect
  17. |-- FloatingPointDefect
  18. | |-- FloatDivByZeroDefect
  19. | |-- FloatInvalidOpDefect
  20. | |-- FloatOverflowDefect
  21. | |-- FloatUnderflowDefect
  22. | `-- InexactDefect
  23. |-- IndexDefect
  24. |-- NilAccessDefect
  25. |-- ObjectAssignmentDefect
  26. |-- ObjectConversionDefect
  27. |-- OutOfMemoryDefect
  28. |-- RangeDefect
  29. |-- ReraiseDefect
  30. `-- StackOverflowDefect