1 | <?php |
||
2 | |||
3 | namespace Larapie\Actions\Concerns; |
||
4 | |||
5 | use Throwable; |
||
6 | |||
7 | trait FailHook |
||
8 | { |
||
9 | 6 | protected function failHook(Throwable $exception) |
|
10 | { |
||
11 | 6 | if (! method_exists($this, 'onFail')) { |
|
12 | 3 | throw $exception; |
|
13 | } |
||
14 | 3 | $this->resolveAndCall($this, 'onFail', compact('exception')); |
|
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
15 | |||
16 | 1 | throw $exception; |
|
17 | } |
||
18 | } |
||
19 |