1 | <?php |
||
9 | class Handler extends ExceptionHandler |
||
10 | { |
||
11 | /** |
||
12 | * A list of the exception types that should not be reported. |
||
13 | * |
||
14 | * @var array |
||
15 | */ |
||
16 | protected $dontReport = [ |
||
17 | \Illuminate\Auth\AuthenticationException::class, |
||
18 | \Illuminate\Auth\Access\AuthorizationException::class, |
||
19 | \Symfony\Component\HttpKernel\Exception\HttpException::class, |
||
20 | \Illuminate\Database\Eloquent\ModelNotFoundException::class, |
||
21 | \Illuminate\Session\TokenMismatchException::class, |
||
22 | \Illuminate\Validation\ValidationException::class, |
||
23 | ]; |
||
24 | |||
25 | /** |
||
26 | * A list of the inputs that are never flashed for validation exceptions. |
||
27 | * |
||
28 | * @var array |
||
29 | */ |
||
30 | protected $dontFlash = [ |
||
31 | 'password', |
||
32 | 'password_confirmation', |
||
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 $e |
||
41 | * |
||
42 | * @return void |
||
43 | */ |
||
44 | public function report(\Exception $e) |
||
51 | |||
52 | /** |
||
53 | * Render an exception into an HTTP response. |
||
54 | * |
||
55 | * @param \Illuminate\Http\Request $request |
||
56 | * @param \Exception $exception |
||
57 | * |
||
58 | * @return \Illuminate\Http\Response |
||
59 | */ |
||
60 | public function render($request, Exception $exception) |
||
64 | |||
65 | /** |
||
66 | * Convert an authentication exception into an unauthenticated response. |
||
67 | * |
||
68 | * @param \Illuminate\Http\Request $request |
||
69 | * @param \Illuminate\Auth\AuthenticationException $exception |
||
70 | * |
||
71 | * @return \Illuminate\Http\Response |
||
72 | */ |
||
73 | protected function unauthenticated($request, AuthenticationException $exception) |
||
81 | } |
||
82 |