Total Complexity | 5 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | trait ErrorHandler |
||
9 | { |
||
10 | private $catchCallable = null; |
||
11 | |||
12 | private ?string $_filename = null; |
||
13 | |||
14 | /** |
||
15 | * Call function if roteted catch any Exception. |
||
16 | */ |
||
17 | public function catch(callable $callable): self |
||
18 | { |
||
19 | $this->catchCallable = $callable; |
||
20 | |||
21 | return $this; |
||
22 | } |
||
23 | |||
24 | protected function setFilename(string $filename): void |
||
27 | } |
||
28 | |||
29 | protected function exception(Throwable $exception): self |
||
38 | } |
||
39 | |||
40 | private function convertException(Throwable $exception): RotationFailed |
||
50 |