fixes #19086: Document exception and defect hierarchy (#22030)

* Documented exception and defect hierarchy (#19086)

* Fixed style
This commit is contained in:
Raynei
2023-06-08 00:55:17 -04:00
committed by GitHub
parent ea91cfb305
commit ba4fb21032

View File

@@ -5013,6 +5013,38 @@ 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`).
```
Exception
|-- CatchableError
| |-- IOError
| | `-- EOFError
| |-- OSError
| |-- ResourceExhaustedError
| `-- ValueError
| `-- KeyError
`-- Defect
|-- AccessViolationDefect
|-- ArithmeticDefect
| |-- DivByZeroDefect
| `-- OverflowDefect
|-- AssertionDefect
|-- DeadThreadDefect
|-- FieldDefect
|-- FloatingPointDefect
| |-- FloatDivByZeroDefect
| |-- FloatInvalidOpDefect
| |-- FloatOverflowDefect
| |-- FloatUnderflowDefect
| `-- InexactDefect
|-- IndexDefect
|-- NilAccessDefect
|-- ObjectAssignmentDefect
|-- ObjectConversionDefect
|-- OutOfMemoryDefect
|-- RangeDefect
|-- ReraiseDefect
`-- StackOverflowDefect
```
Imported exceptions
-------------------