You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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