1 <?php namespace App\Exceptions; |
1 <?php |
|
2 |
|
3 namespace CorpusParole\Exceptions; |
2 |
4 |
3 use Exception; |
5 use Exception; |
4 use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; |
6 use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; |
5 |
7 |
6 class Handler extends ExceptionHandler { |
8 class Handler extends ExceptionHandler |
|
9 { |
|
10 /** |
|
11 * A list of the exception types that should not be reported. |
|
12 * |
|
13 * @var array |
|
14 */ |
|
15 protected $dontReport = [ |
|
16 'Symfony\Component\HttpKernel\Exception\HttpException', |
|
17 ]; |
7 |
18 |
8 /** |
19 /** |
9 * A list of the exception types that should not be reported. |
20 * Report or log an exception. |
10 * |
21 * |
11 * @var array |
22 * This is a great spot to send exceptions to Sentry, Bugsnag, etc. |
12 */ |
23 * |
13 protected $dontReport = [ |
24 * @param \Exception $e |
14 'Symfony\Component\HttpKernel\Exception\HttpException' |
25 */ |
15 ]; |
26 public function report(Exception $e) |
|
27 { |
|
28 return parent::report($e); |
|
29 } |
16 |
30 |
17 /** |
31 /** |
18 * Report or log an exception. |
32 * Render an exception into an HTTP response. |
19 * |
33 * |
20 * This is a great spot to send exceptions to Sentry, Bugsnag, etc. |
34 * @param \Illuminate\Http\Request $request |
21 * |
35 * @param \Exception $e |
22 * @param \Exception $e |
36 * |
23 * @return void |
37 * @return \Illuminate\Http\Response |
24 */ |
38 */ |
25 public function report(Exception $e) |
39 public function render($request, Exception $e) |
26 { |
40 { |
27 return parent::report($e); |
41 return parent::render($request, $e); |
28 } |
42 } |
29 |
|
30 /** |
|
31 * Render an exception into an HTTP response. |
|
32 * |
|
33 * @param \Illuminate\Http\Request $request |
|
34 * @param \Exception $e |
|
35 * @return \Illuminate\Http\Response |
|
36 */ |
|
37 public function render($request, Exception $e) |
|
38 { |
|
39 return parent::render($request, $e); |
|
40 } |
|
41 |
|
42 } |
43 } |