正在显示
1 个修改的文件
包含
28 行增加
和
2 行删除
| @@ -7,10 +7,36 @@ use Throwable; | @@ -7,10 +7,36 @@ use Throwable; | ||
| 7 | 7 | ||
| 8 | class Handler extends BaseHandler | 8 | class Handler extends BaseHandler |
| 9 | { | 9 | { |
| 10 | + /** | ||
| 11 | + * @param Throwable $e | ||
| 12 | + * | ||
| 13 | + * @return void | ||
| 14 | + * @throws Throwable | ||
| 15 | + */ | ||
| 10 | public function report(Throwable $e) | 16 | public function report(Throwable $e) |
| 11 | { | 17 | { |
| 12 | - parent::report($e); // TODO: Change the autogenerated stub | 18 | + $this->beforeReport($e); |
| 13 | 19 | ||
| 14 | - app('exception.push')->report($e); | 20 | + $this->afterReport($e); |
| 21 | + } | ||
| 22 | + | ||
| 23 | + /** | ||
| 24 | + * @throws Throwable | ||
| 25 | + */ | ||
| 26 | + private function beforeReport(Throwable $e) | ||
| 27 | + { | ||
| 28 | + parent::report($e); | ||
| 29 | + } | ||
| 30 | + | ||
| 31 | + /** | ||
| 32 | + * @param Throwable $e | ||
| 33 | + * | ||
| 34 | + * @return void | ||
| 35 | + */ | ||
| 36 | + private function afterReport(Throwable $e) | ||
| 37 | + { | ||
| 38 | + if ($this->shouldReport($e)) { | ||
| 39 | + app('exception.push')->report($e); | ||
| 40 | + } | ||
| 15 | } | 41 | } |
| 16 | } | 42 | } |
-
请 注册 或 登录 后发表评论