1 | <?php |
||
18 | class ShipExceptionsHandler extends LaravelExceptionHandler |
||
19 | { |
||
20 | |||
21 | /** |
||
22 | * A list of the exception types that should not be reported. |
||
23 | * |
||
24 | * @var array |
||
25 | */ |
||
26 | protected $dontReport = [ |
||
27 | \Symfony\Component\HttpKernel\Exception\HttpException::class, |
||
28 | // \Illuminate\Database\Eloquent\ModelNotFoundException::class, |
||
29 | // \Illuminate\Auth\AuthenticationException::class, |
||
30 | // \Illuminate\Auth\Access\AuthorizationException::class, |
||
31 | // \Illuminate\Session\TokenMismatchException::class, |
||
32 | // \Illuminate\Validation\ValidationException::class, |
||
33 | ]; |
||
34 | |||
35 | /** |
||
36 | * Report or log an exception. |
||
37 | * |
||
38 | * This is a great spot to send exceptions to Sentry, Bugsnag, etc. |
||
39 | * |
||
40 | * @param \Exception $exception |
||
41 | * |
||
42 | * @return void |
||
43 | */ |
||
44 | public function report(Exception $exception) |
||
48 | |||
49 | /** |
||
50 | * Render an exception into an HTTP response. |
||
51 | * |
||
52 | * @param \Illuminate\Http\Request $request |
||
53 | * @param \Exception $exception |
||
54 | * |
||
55 | * @return \Illuminate\Http\Response |
||
56 | */ |
||
57 | public function render($request, Exception $exception) |
||
67 | |||
68 | /** |
||
69 | * Convert an authentication exception into an unauthenticated response. |
||
70 | * |
||
71 | * @param \Illuminate\Http\Request $request |
||
72 | * @param \Illuminate\Auth\AuthenticationException $exception |
||
73 | * |
||
74 | * @return \Illuminate\Http\Response |
||
75 | */ |
||
76 | protected function unauthenticated($request, AuthenticationException $exception) |
||
84 | } |
||
85 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.