1 | <?php |
||
10 | class Handler extends ExceptionHandler |
||
11 | { |
||
12 | /** |
||
13 | * A list of the exception types that should not be reported. |
||
14 | * |
||
15 | * @var array |
||
16 | */ |
||
17 | protected $dontReport = [ |
||
18 | \Illuminate\Auth\AuthenticationException::class, |
||
19 | \Illuminate\Auth\Access\AuthorizationException::class, |
||
20 | \Symfony\Component\HttpKernel\Exception\HttpException::class, |
||
21 | \Illuminate\Database\Eloquent\ModelNotFoundException::class, |
||
22 | \Illuminate\Session\TokenMismatchException::class, |
||
23 | \Illuminate\Validation\ValidationException::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 $exception |
||
32 | * @return void |
||
33 | */ |
||
34 | public function report(Exception $exception) |
||
38 | |||
39 | /** |
||
40 | * Render an exception into an HTTP response. |
||
41 | * |
||
42 | * @param \Illuminate\Http\Request $request |
||
43 | * @param \Exception $exception |
||
44 | * @return \Illuminate\Http\Response |
||
45 | */ |
||
46 | public function render($request, Exception $exception) |
||
68 | |||
69 | /** |
||
70 | * Convert an authentication exception into an unauthenticated response. |
||
71 | * |
||
72 | * @param \Illuminate\Http\Request $request |
||
73 | * @param \Illuminate\Auth\AuthenticationException $exception |
||
74 | * @return \Illuminate\Http\Response |
||
75 | */ |
||
76 | protected function unauthenticated($request, AuthenticationException $exception) |
||
84 | } |
||
85 |
This check looks for a call to a parent method whose name is different than the method from which it is called.
Consider the following code:
The
getFirstName()
method in theSon
calls the wrong method in the parent class.