ExceptionHandler.php 1.1 KB

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