Shift exception handler

This commit is contained in:
Shift
2023-01-07 20:33:02 +00:00
parent a38755e1a8
commit 0f3ee8ab58

View File

@@ -10,7 +10,7 @@ class Handler extends ExceptionHandler
/** /**
* A list of the exception types that are not reported. * A list of the exception types that are not reported.
* *
* @var array * @var array<int, class-string<Throwable>>
*/ */
protected $dontReport = [ protected $dontReport = [
// //
@@ -19,37 +19,23 @@ class Handler extends ExceptionHandler
/** /**
* A list of the inputs that are never flashed for validation exceptions. * A list of the inputs that are never flashed for validation exceptions.
* *
* @var array * @var array<int, string>
*/ */
protected $dontFlash = [ protected $dontFlash = [
'current_password',
'password', 'password',
'password_confirmation', 'password_confirmation',
]; ];
/** /**
* Report or log an exception. * Register the exception handling callbacks for the application.
* *
* @param \Throwable $exception
* @return void * @return void
*
* @throws \Throwable
*/ */
public function report(Throwable $exception) public function register()
{ {
parent::report($exception); $this->reportable(function (Throwable $e) {
} //
});
/**
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
* @param \Throwable $exception
* @return \Symfony\Component\HttpFoundation\Response
*
* @throws \Throwable
*/
public function render($request, Throwable $exception)
{
return parent::render($request, $exception);
} }
} }