firefly-iii/app/Exceptions/Handler.php

59 lines
1.4 KiB
PHP
Raw Normal View History

<?php
namespace FireflyIII\Exceptions;
2015-02-05 21:39:52 -06:00
use Exception;
use Illuminate\Auth\Access\AuthorizationException;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Illuminate\Foundation\Validation\ValidationException;
use Symfony\Component\HttpKernel\Exception\HttpException;
2015-02-05 21:39:52 -06:00
/**
* Class Handler
*
* @package FireflyIII\Exceptions
*/
2015-02-11 00:35:10 -06:00
class Handler extends ExceptionHandler
{
/**
* A list of the exception types that should not be reported.
*
* @var array
*/
protected $dontReport
= [
AuthorizationException::class,
HttpException::class,
ModelNotFoundException::class,
ValidationException::class,
];
2015-02-05 21:39:52 -06:00
2015-02-11 00:35:10 -06:00
/**
* Report or log an exception.
2015-02-11 00:35:10 -06:00
*
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
2015-02-11 00:35:10 -06:00
*
* @param Exception $exception
*
* @return void
2015-02-11 00:35:10 -06:00
*/
public function report(Exception $exception)
2015-02-11 00:35:10 -06:00
{
parent::report($exception);
2015-02-11 00:35:10 -06:00
}
2015-02-05 21:39:52 -06:00
2015-02-11 00:35:10 -06:00
/**
* Render an exception into an HTTP response.
2015-02-11 00:35:10 -06:00
*
* @param \Illuminate\Http\Request $request
2016-01-15 13:57:26 -06:00
* @param \Exception $exception
*
* @return \Illuminate\Http\Response
2015-02-11 00:35:10 -06:00
*/
2016-01-15 13:57:26 -06:00
public function render($request, Exception $exception)
2015-02-11 00:35:10 -06:00
{
2016-01-15 13:57:26 -06:00
return parent::render($request, $exception);
2015-02-11 00:35:10 -06:00
}
2015-02-05 21:39:52 -06:00
}