1 | <?php |
||
12 | class Handler extends ExceptionHandler |
||
13 | { |
||
14 | use HandlesErrors; |
||
15 | |||
16 | /** |
||
17 | * A list of the exception types that should not be reported. |
||
18 | * |
||
19 | * @var array |
||
20 | */ |
||
21 | protected $dontReport = [ |
||
22 | \Illuminate\Auth\AuthenticationException::class, |
||
23 | \Illuminate\Auth\Access\AuthorizationException::class, |
||
24 | \Symfony\Component\HttpKernel\Exception\HttpException::class, |
||
25 | \Illuminate\Database\Eloquent\ModelNotFoundException::class, |
||
26 | \Illuminate\Session\TokenMismatchException::class, |
||
27 | \Illuminate\Validation\ValidationException::class, |
||
28 | JsonApiException::class, |
||
29 | ]; |
||
30 | |||
31 | /** |
||
32 | * Report or log an exception. |
||
33 | * |
||
34 | * This is a great spot to send exceptions to Sentry, Bugsnag, etc. |
||
35 | * |
||
36 | * @param \Exception $exception |
||
37 | * @return void |
||
38 | */ |
||
39 | public function report(Exception $exception) |
||
43 | |||
44 | /** |
||
45 | * Render an exception into an HTTP response. |
||
46 | * |
||
47 | * @param \Illuminate\Http\Request $request |
||
48 | * @param \Exception $exception |
||
49 | * @return \Illuminate\Http\Response |
||
50 | */ |
||
51 | public function render($request, Exception $exception) |
||
59 | |||
60 | /** |
||
61 | * Convert an authentication exception into an unauthenticated response. |
||
62 | * |
||
63 | * @param \Illuminate\Http\Request $request |
||
64 | * @param \Illuminate\Auth\AuthenticationException $exception |
||
65 | * @return \Illuminate\Http\Response |
||
66 | */ |
||
67 | protected function unauthenticated($request, AuthenticationException $exception) |
||
77 | } |
||
78 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.