blob: 54381a179af20c8e7397f1080b7ce0411d6a3fbe [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
44 */
45 public function renderForConsole($output, Throwable $e);
46}