From 0f3ee8ab58ab7f427cf3bd0f6a2c2bdc4e13d1ac Mon Sep 17 00:00:00 2001 From: Shift Date: Sat, 7 Jan 2023 20:33:02 +0000 Subject: [PATCH] Shift exception handler --- app/Exceptions/Handler.php | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 5a53cd3ba..8e7fbd1be 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -10,7 +10,7 @@ class Handler extends ExceptionHandler /** * A list of the exception types that are not reported. * - * @var array + * @var array> */ protected $dontReport = [ // @@ -19,37 +19,23 @@ class Handler extends ExceptionHandler /** * A list of the inputs that are never flashed for validation exceptions. * - * @var array + * @var array */ protected $dontFlash = [ + 'current_password', 'password', 'password_confirmation', ]; /** - * Report or log an exception. + * Register the exception handling callbacks for the application. * - * @param \Throwable $exception * @return void - * - * @throws \Throwable */ - public function report(Throwable $exception) + public function register() { - parent::report($exception); - } - - /** - * 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); + $this->reportable(function (Throwable $e) { + // + }); } }