正在显示
3 个修改的文件
包含
5 行增加
和
29 行删除
src/Contracts/ExceptionHandler.php
已删除
100644 → 0
| 1 | -<?php | ||
| 2 | - | ||
| 3 | -namespace Lackoxygen\ExceptionPush\Contracts; | ||
| 4 | - | ||
| 5 | -interface ExceptionHandler | ||
| 6 | -{ | ||
| 7 | - /** | ||
| 8 | - * @param \Throwable $e | ||
| 9 | - * | ||
| 10 | - * @return mixed | ||
| 11 | - */ | ||
| 12 | - public function handle(\Throwable $e); | ||
| 13 | - | ||
| 14 | - /** | ||
| 15 | - * @param \Throwable $e | ||
| 16 | - * | ||
| 17 | - * @return mixed | ||
| 18 | - */ | ||
| 19 | - public function render(\Throwable $e); | ||
| 20 | - | ||
| 21 | - /** | ||
| 22 | - * @param \Throwable $e | ||
| 23 | - * | ||
| 24 | - * @return mixed | ||
| 25 | - */ | ||
| 26 | - public function report(\Throwable $e); | ||
| 27 | -} |
| @@ -11,6 +11,6 @@ class Handler extends BaseHandler | @@ -11,6 +11,6 @@ class Handler extends BaseHandler | ||
| 11 | { | 11 | { |
| 12 | parent::report($e); // TODO: Change the autogenerated stub | 12 | parent::report($e); // TODO: Change the autogenerated stub |
| 13 | 13 | ||
| 14 | - app('exception.push')->boot($e); | 14 | + app('exception.push')->report($e); |
| 15 | } | 15 | } |
| 16 | } | 16 | } |
| @@ -66,13 +66,16 @@ class ExceptionPush | @@ -66,13 +66,16 @@ class ExceptionPush | ||
| 66 | /** | 66 | /** |
| 67 | * @return void | 67 | * @return void |
| 68 | */ | 68 | */ |
| 69 | - public function boot(\Throwable $e) | 69 | + public function report(\Throwable $e) |
| 70 | { | 70 | { |
| 71 | $this->parser->extract($e); | 71 | $this->parser->extract($e); |
| 72 | 72 | ||
| 73 | $this->dispatch($this->format()); | 73 | $this->dispatch($this->format()); |
| 74 | } | 74 | } |
| 75 | 75 | ||
| 76 | + /** | ||
| 77 | + * @return array | ||
| 78 | + */ | ||
| 76 | protected function format(): array | 79 | protected function format(): array |
| 77 | { | 80 | { |
| 78 | $formatter = Formatter::callback(); | 81 | $formatter = Formatter::callback(); |
-
请 注册 或 登录 后发表评论