1 | <?php |
||
14 | class Handler extends ExceptionHandler |
||
15 | { |
||
16 | /** |
||
17 | * A list of the exception types that should not be reported. |
||
18 | * |
||
19 | * @var array |
||
20 | */ |
||
21 | protected $dontReport = [ |
||
22 | HttpException::class, |
||
23 | ModelNotFoundException::class, |
||
24 | ]; |
||
25 | |||
26 | /** |
||
27 | * Report or log an exception. |
||
28 | * |
||
29 | * This is a great spot to send exceptions to Sentry, Bugsnag, etc. |
||
30 | * |
||
31 | * @param \Exception $e |
||
32 | */ |
||
33 | public function report(Exception $e) |
||
37 | |||
38 | /** |
||
39 | * Render an exception into an HTTP response. |
||
40 | * |
||
41 | * @param \Illuminate\Http\Request $request |
||
42 | * @param \Exception $e |
||
43 | * |
||
44 | * @return \Illuminate\Http\Response |
||
45 | */ |
||
46 | public function render($request, Exception $e) |
||
69 | } |
||
70 |
This check looks at variables that are passed out again to other methods.
If the outgoing method call has stricter type requirements than the method itself, an issue is raised.
An additional type check may prevent trouble.