Matthias Andreas Benkard | 7b2a3a1 | 2021-08-16 10:57:25 +0200 | [diff] [blame] | 1 | <?php |
| 2 | |
| 3 | namespace Illuminate\Contracts\Debug; |
| 4 | |
| 5 | use Throwable; |
| 6 | |
| 7 | interface ExceptionHandler |
| 8 | { |
| 9 | /** |
| 10 | * Report or log an exception. |
| 11 | * |
| 12 | * @param \Throwable $e |
| 13 | * @return void |
| 14 | * |
| 15 | * @throws \Throwable |
| 16 | */ |
| 17 | public function report(Throwable $e); |
| 18 | |
| 19 | /** |
| 20 | * Determine if the exception should be reported. |
| 21 | * |
| 22 | * @param \Throwable $e |
| 23 | * @return bool |
| 24 | */ |
| 25 | public function shouldReport(Throwable $e); |
| 26 | |
| 27 | /** |
| 28 | * Render an exception into an HTTP response. |
| 29 | * |
| 30 | * @param \Illuminate\Http\Request $request |
| 31 | * @param \Throwable $e |
| 32 | * @return \Symfony\Component\HttpFoundation\Response |
| 33 | * |
| 34 | * @throws \Throwable |
| 35 | */ |
| 36 | public function render($request, Throwable $e); |
| 37 | |
| 38 | /** |
| 39 | * Render an exception to the console. |
| 40 | * |
| 41 | * @param \Symfony\Component\Console\Output\OutputInterface $output |
| 42 | * @param \Throwable $e |
| 43 | * @return void |
Matthias Andreas Benkard | 1ba5381 | 2022-12-27 17:32:58 +0100 | [diff] [blame^] | 44 | * |
| 45 | * @internal This method is not meant to be used or overwritten outside the framework. |
Matthias Andreas Benkard | 7b2a3a1 | 2021-08-16 10:57:25 +0200 | [diff] [blame] | 46 | */ |
| 47 | public function renderForConsole($output, Throwable $e); |
| 48 | } |