Handler.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. namespace App\Exceptions;
  3. use Illuminate\Auth\Access\AuthorizationException;
  4. use Illuminate\Database\Eloquent\ModelNotFoundException;
  5. use Illuminate\Validation\ValidationException;
  6. use Laravel\Lumen\Exceptions\Handler as ExceptionHandler;
  7. use Symfony\Component\HttpKernel\Exception\HttpException;
  8. use Throwable;
  9. class Handler extends ExceptionHandler {
  10. /**
  11. * A list of the exception types that should not be reported.
  12. *
  13. * @var array
  14. */
  15. protected $dontReport = [];
  16. /**
  17. * Report or log an exception.
  18. *
  19. * This is a great spot to send exceptions to Sentry, Bugsnag, etc.
  20. *
  21. * @param \Throwable $exception
  22. * @return void
  23. *
  24. * @throws \Exception
  25. */
  26. public function report(Throwable $exception) {
  27. parent::report($exception);
  28. }
  29. /**
  30. * Render an exception into an HTTP response.
  31. *
  32. * @param \Illuminate\Http\Request $request
  33. * @param \Throwable $exception
  34. * @return \Illuminate\Http\Response|\Illuminate\Http\JsonResponse
  35. *
  36. * @throws \Throwable
  37. */
  38. public function render($request, Throwable $exception) {
  39. return parent::render($request, $exception);
  40. }
  41. }