1 | <?php namespace Arcanedev\LaravelTracker\Exceptions; |
||
13 | class Handler implements ExceptionHandlerContract |
||
14 | { |
||
15 | /* ------------------------------------------------------------------------------------------------ |
||
16 | | Properties |
||
17 | | ------------------------------------------------------------------------------------------------ |
||
18 | */ |
||
19 | /** @var \Arcanedev\LaravelTracker\Contracts\Tracker */ |
||
20 | private $manager; |
||
21 | |||
22 | /** @var \Illuminate\Contracts\Debug\ExceptionHandler */ |
||
23 | private $illuminateHandler; |
||
24 | |||
25 | private $originalExceptionHandler; |
||
26 | |||
27 | private $originalErrorHandler; |
||
28 | |||
29 | /* ------------------------------------------------------------------------------------------------ |
||
30 | | Constructor |
||
31 | | ------------------------------------------------------------------------------------------------ |
||
32 | */ |
||
33 | /** |
||
34 | * Handler constructor. |
||
35 | * |
||
36 | * @param \Arcanedev\LaravelTracker\Contracts\Tracker $tracker |
||
37 | * @param \Illuminate\Contracts\Debug\ExceptionHandler $illuminateHandler |
||
38 | */ |
||
39 | 117 | public function __construct(Tracker $tracker, ExceptionHandlerContract $illuminateHandler) |
|
46 | |||
47 | /* ------------------------------------------------------------------------------------------------ |
||
48 | | Main Functions |
||
49 | | ------------------------------------------------------------------------------------------------ |
||
50 | */ |
||
51 | /** |
||
52 | * Report or log an exception. |
||
53 | * |
||
54 | * @param \Exception $e |
||
55 | */ |
||
56 | 3 | public function report(Exception $e) |
|
67 | |||
68 | /** |
||
69 | * Render an exception into an HTTP response. |
||
70 | * |
||
71 | * @param \Illuminate\Http\Request $request |
||
72 | * @param \Exception $e |
||
73 | * |
||
74 | * @return \Symfony\Component\HttpFoundation\Response |
||
75 | */ |
||
76 | 3 | public function render($request, Exception $e) |
|
80 | |||
81 | /** |
||
82 | * Render an exception to the console. |
||
83 | * |
||
84 | * @param \Symfony\Component\Console\Output\OutputInterface $output |
||
85 | * @param \Exception $e |
||
86 | */ |
||
87 | public function renderForConsole($output, Exception $e) |
||
91 | |||
92 | /** |
||
93 | * Track the exception. |
||
94 | * |
||
95 | * @param Exception $exception |
||
96 | * |
||
97 | * @return mixed |
||
98 | */ |
||
99 | public function trackException(Exception $exception) |
||
111 | |||
112 | /** |
||
113 | * Handle the error. |
||
114 | * |
||
115 | * @param int $err_severity |
||
116 | * @param string $err_msg |
||
117 | * @param mixed $err_file |
||
118 | * @param mixed $err_line |
||
119 | * @param array $err_context |
||
120 | * |
||
121 | * @return mixed |
||
122 | */ |
||
123 | 105 | public function handleError($err_severity, $err_msg, $err_file, $err_line, array $err_context) |
|
137 | } |
||
138 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.