| 1 | <?php |
||
| 7 | class ErrorHandler |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var ExceptionToJsonRenderer |
||
| 11 | */ |
||
| 12 | private $exceptionRenderer; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @param ExceptionToJsonRenderer $exceptionRenderer |
||
| 16 | */ |
||
| 17 | public function __construct(ExceptionToJsonRenderer $exceptionRenderer) |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @codeCoverageIgnore |
||
| 24 | */ |
||
| 25 | public static function register() |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @param int $errno |
||
| 34 | * @param string $errstr |
||
| 35 | * @param string $errfile |
||
| 36 | * @param int $errline |
||
| 37 | * @throws \ErrorException |
||
| 38 | */ |
||
| 39 | public function handleError($errno, $errstr, $errfile = '', $errline = 0) |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @param Throwable $throwable |
||
| 46 | */ |
||
| 47 | public function handleException(Throwable $throwable) |
||
| 53 | } |
||
| 54 |