59 lines
2.2 KiB
Markdown
59 lines
2.2 KiB
Markdown
# Extended Exceptions
|
|
|
|
A group of extended Exceptions
|
|
|
|
- SQL errors
|
|
- File handling
|
|
|
|
## Setup from central composer
|
|
|
|
Setup from gitea internal servers
|
|
|
|
```sh
|
|
composer config repositories.git.egplusww.jp.Composer composer https://git.egplusww.jp/api/packages/Composer/composer
|
|
```
|
|
|
|
Alternative setup composer local zip file repot:
|
|
`composer config repositories.composer.egplusww.jp composer http://composer.egplusww.jp`
|
|
|
|
## Install package
|
|
|
|
`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>
|