blob: 3b6594a2ba29cff71599b307288da83921dde128 [file] [log] [blame]
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +02001<?php
2
3namespace Illuminate\Contracts\Debug;
4
5use Throwable;
6
7interface 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 Benkard1ba53812022-12-27 17:32:58 +010044 *
45 * @internal This method is not meant to be used or overwritten outside the framework.
Matthias Andreas Benkard7b2a3a12021-08-16 10:57:25 +020046 */
47 public function renderForConsole($output, Throwable $e);
48}