]> BookStack Code Mirror - bookstack/blobdiff - app/Exceptions/Handler.php
Added test for logical-theme-system command registration
[bookstack] / app / Exceptions / Handler.php
index 2d40f44769127062ea294a7ba12603cf3ad6b05f..3b4ad4a4da54ae46e003a004988c7aacc24fd803 100644 (file)
@@ -9,6 +9,7 @@ use Illuminate\Http\JsonResponse;
 use Illuminate\Http\Request;
 use Illuminate\Validation\ValidationException;
 use Symfony\Component\HttpKernel\Exception\HttpException;
+use Throwable;
 
 class Handler extends ExceptionHandler
 {
@@ -27,6 +28,7 @@ class Handler extends ExceptionHandler
      * @var array
      */
     protected $dontFlash = [
+        'current_password',
         'password',
         'password_confirmation',
     ];
@@ -34,13 +36,13 @@ class Handler extends ExceptionHandler
     /**
      * Report or log an exception.
      *
-     * @param Exception $exception
+     * @param \Throwable $exception
      *
-     * @throws Exception
+     * @throws \Throwable
      *
      * @return void
      */
-    public function report(Exception $exception)
+    public function report(Throwable $exception)
     {
         parent::report($exception);
     }
@@ -53,7 +55,7 @@ class Handler extends ExceptionHandler
      *
      * @return \Illuminate\Http\Response
      */
-    public function render($request, Exception $e)
+    public function render($request, Throwable $e)
     {
         if ($this->isApiRequest($request)) {
             return $this->renderApiException($e);