Readme update
This commit is contained in:
37
ReadMe.md
37
ReadMe.md
@@ -19,3 +19,40 @@ Alternative setup composer local zip file repot:
|
|||||||
## Install package
|
## Install package
|
||||||
|
|
||||||
`composer require egrajp/exceptions-extended`
|
`composer require egrajp/exceptions-extended`
|
||||||
|
|
||||||
|
## PHP Exception model
|
||||||
|
|
||||||
|
Here's a chart that demonstrates the new hierarchy introduced in PHP 7:
|
||||||
|
|
||||||
|
```txt
|
||||||
|
\Throwable
|
||||||
|
├── \Exception (implements \Throwable)
|
||||||
|
| |── \DOMException (extends \Exception)
|
||||||
|
| ├── \IntlException (extends \Exception)
|
||||||
|
| ├── \JsonException (extends \Exception)
|
||||||
|
| |── \PharException (extends \Exception)
|
||||||
|
| |── \ReflectionException (extends \Exception)
|
||||||
|
| |── \ValueError (extends \Exception)
|
||||||
|
│ ├── \LogicException (extends \Exception)
|
||||||
|
│ │ ├── \BadFunctionCallException (extends \LogicException)
|
||||||
|
│ │ │ └── \BadMethodCallException (extends \BadFunctionCallException)
|
||||||
|
│ │ ├── \DomainException (extends \LogicException)
|
||||||
|
│ │ ├── \InvalidArgumentException (extends \LogicException)
|
||||||
|
│ │ ├── \LengthException (extends \LogicException)
|
||||||
|
│ │ └── \OutOfRangeException (extends \LogicException)
|
||||||
|
│ └── \RuntimeException (extends \Exception)
|
||||||
|
│ ├── \OutOfBoundsException (extends \RuntimeException)
|
||||||
|
│ ├── \OverflowException (extends \RuntimeException)
|
||||||
|
│ ├── \RangeException (extends \RuntimeException)
|
||||||
|
│ ├── \UnderflowException (extends \RuntimeException)
|
||||||
|
│ └── \UnexpectedValueException (extends \RuntimeException)
|
||||||
|
└── \Error (implements \Throwable)
|
||||||
|
├── \AssertionError (extends \Error)
|
||||||
|
├── \ParseError (extends \Error)
|
||||||
|
└── \TypeError (extends \Error)
|
||||||
|
└── \ArgumentCountError (extends \TypeError)
|
||||||
|
└── \ArithmeticError (extends \Error)
|
||||||
|
└── \DivisionByZeroError (extends \ArithmeticError)
|
||||||
|
```
|
||||||
|
|
||||||
|
<http://soba.tokyo.tequila.jp/developers/clemens/php/exceptions-tree.php>
|
||||||
|
|||||||
Reference in New Issue
Block a user