Handler.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. namespace App\Exceptions;
  3. use Exception;
  4. use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
  5. use Illuminate\Http\Request;
  6. use Illuminate\Http\Response;
  7. use Throwable;
  8. class Handler extends ExceptionHandler
  9. {
  10. /**
  11. * A list of the exception types that are not reported.
  12. *
  13. * @var array
  14. */
  15. protected $dontReport = [
  16. //
  17. ];
  18. /**
  19. * A list of the inputs that are never flashed for validation exceptions.
  20. *
  21. * @var array
  22. */
  23. protected $dontFlash = [
  24. 'password',
  25. 'password_confirmation',
  26. ];
  27. /**
  28. * Report or log an exception.
  29. *
  30. * @param Throwable $exception
  31. * @return void
  32. * @throws Exception
  33. */
  34. public function report(Throwable $exception)
  35. {
  36. parent::report($exception);
  37. }
  38. /**
  39. * Render an exception into an HTTP response.
  40. *
  41. * @param Request $request
  42. * @param Throwable $exception
  43. * @return Response
  44. * @throws Throwable
  45. */
  46. public function render($request, Throwable $exception)
  47. {
  48. return parent::render($request, $exception);
  49. }
  50. }