Total Complexity | 7 |
Total Lines | 87 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php |
||
12 | class Handler extends ExceptionHandler |
||
13 | { |
||
14 | /** |
||
15 | * A list of the exception types that are not reported. |
||
16 | * |
||
17 | * @var array |
||
|
|||
18 | */ |
||
19 | protected $dontReport = [ |
||
20 | // |
||
21 | ]; |
||
22 | |||
23 | /** |
||
24 | * A list of the inputs that are never flashed for validation exceptions. |
||
25 | * |
||
26 | * @var array |
||
27 | */ |
||
28 | protected $dontFlash = [ |
||
29 | 'password', |
||
30 | 'password_confirmation', |
||
31 | 'old_password', |
||
32 | 'new_password', |
||
33 | 'new_password_confirmation', |
||
34 | ]; |
||
35 | |||
36 | /** |
||
37 | * Report or log an exception. |
||
38 | * |
||
39 | * @param \Exception $exception |
||
2 ignored issues
–
show
|
|||
40 | * @return void |
||
41 | */ |
||
42 | public function report(Exception $exception) |
||
43 | { |
||
44 | parent::report($exception); |
||
45 | } |
||
46 | |||
47 | /** |
||
48 | * Render an exception into an HTTP response. |
||
49 | * |
||
50 | * @param \Illuminate\Http\Request $request |
||
2 ignored issues
–
show
|
|||
51 | * @param \Exception $exception |
||
2 ignored issues
–
show
|
|||
52 | * @return \Illuminate\Http\Response |
||
53 | */ |
||
54 | public function render($request, Exception $exception) |
||
1 ignored issue
–
show
|
|||
55 | { |
||
56 | return parent::render($request, $exception); |
||
57 | } |
||
58 | |||
59 | /** |
||
60 | * Convert an authentication exception into an unauthenticated response. |
||
61 | * |
||
62 | * @param \Illuminate\Http\Request $request |
||
2 ignored issues
–
show
|
|||
63 | * @param \Illuminate\Auth\AuthenticationException $exception |
||
2 ignored issues
–
show
|
|||
64 | * @return \Illuminate\Http\Response |
||
65 | */ |
||
66 | protected function unauthenticated($request, AuthenticationException $exception) |
||
77 | } |
||
78 | |||
79 | /** |
||
80 | * OVERRIDE |
||
81 | * Render the given HttpException. |
||
82 | * |
||
83 | * @param \Symfony\Component\HttpKernel\Exception\HttpException $e |
||
2 ignored issues
–
show
|
|||
84 | * @return \Symfony\Component\HttpFoundation\Response |
||
85 | */ |
||
86 | protected function renderHttpException(HttpException $e) |
||
87 | { |
||
88 | if (! view()->exists("errors.{$e->getStatusCode()}")) { |
||
89 | return response()->view('errors.default', [ |
||
90 | 'exception' => $e, |
||
91 | 'goc' => Lang::get('common/goc'), |
||
92 | 'alert' => Lang::get('common/alert'), |
||
93 | 'error' => [ |
||
94 | "title" => "Error" |
||
95 | ] |
||
96 | ], $e->getStatusCode(), $e->getHeaders()); |
||
97 | } |
||
98 | return parent::renderHttpException($e); |
||
99 | } |
||
101 |