2016-01-08 09:02:15 -06:00
|
|
|
<?php
|
2017-04-09 00:44:22 -05:00
|
|
|
|
2016-01-08 09:02:15 -06:00
|
|
|
namespace FireflyIII\Exceptions;
|
2015-02-05 21:39:52 -06:00
|
|
|
|
|
|
|
use Exception;
|
2016-01-08 09:02:15 -06:00
|
|
|
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
2016-02-12 07:15:49 -06:00
|
|
|
|
2015-02-11 00:35:10 -06:00
|
|
|
class Handler extends ExceptionHandler
|
|
|
|
{
|
|
|
|
/**
|
2017-09-09 14:57:45 -05:00
|
|
|
* A list of the exception types that are not reported.
|
2015-02-11 00:35:10 -06:00
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
2017-09-09 14:57:45 -05:00
|
|
|
protected $dontReport = [
|
|
|
|
//
|
|
|
|
];
|
2015-02-05 21:39:52 -06:00
|
|
|
|
2015-02-11 00:35:10 -06:00
|
|
|
/**
|
2017-09-09 14:57:45 -05:00
|
|
|
* A list of the inputs that are never flashed for validation exceptions.
|
2016-01-09 01:20:55 -06:00
|
|
|
*
|
2017-09-09 14:57:45 -05:00
|
|
|
* @var array
|
2015-02-11 00:35:10 -06:00
|
|
|
*/
|
2017-09-09 14:57:45 -05:00
|
|
|
protected $dontFlash = [
|
|
|
|
'password',
|
|
|
|
'password_confirmation',
|
|
|
|
];
|
2016-02-11 07:17:11 -06:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Report or log an exception.
|
|
|
|
*
|
|
|
|
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
|
|
|
|
*
|
2017-09-09 14:57:45 -05:00
|
|
|
* @param \Exception $exception
|
2016-02-11 07:17:11 -06:00
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function report(Exception $exception)
|
|
|
|
{
|
2016-01-27 11:31:44 -06:00
|
|
|
parent::report($exception);
|
2015-02-11 00:35:10 -06:00
|
|
|
}
|
2016-09-15 23:40:45 -05:00
|
|
|
|
|
|
|
/**
|
2017-09-09 14:57:45 -05:00
|
|
|
* Render an exception into an HTTP response.
|
2016-10-06 22:44:21 -05:00
|
|
|
*
|
2017-09-09 14:57:45 -05:00
|
|
|
* @param \Illuminate\Http\Request $request
|
|
|
|
* @param \Exception $exception
|
|
|
|
* @return \Illuminate\Http\Response
|
2016-09-15 23:40:45 -05:00
|
|
|
*/
|
2017-09-09 14:57:45 -05:00
|
|
|
public function render($request, Exception $exception)
|
2016-09-15 23:40:45 -05:00
|
|
|
{
|
2017-09-09 14:57:45 -05:00
|
|
|
return parent::render($request, $exception);
|
2016-09-15 23:40:45 -05:00
|
|
|
}
|
2015-02-05 21:39:52 -06:00
|
|
|
}
|