diff --git a/packages/Webkul/Admin/src/Exceptions/Handler.php b/packages/Webkul/Admin/src/Exceptions/Handler.php index 5f05dd4bd..e5dfa0066 100755 --- a/packages/Webkul/Admin/src/Exceptions/Handler.php +++ b/packages/Webkul/Admin/src/Exceptions/Handler.php @@ -4,9 +4,9 @@ use App\Exceptions\Handler as AppExceptionHandler; use Illuminate\Auth\AuthenticationException; +use PDOException; use Illuminate\Container\Container; use Illuminate\Database\Eloquent\ModelNotFoundException; -use PDOException; use Symfony\Component\HttpKernel\Exception\HttpException; use Throwable; @@ -52,6 +52,17 @@ public function render($request, Throwable $exception) return parent::render($request, $exception); } + /** + * Report the exception. + * + * @param \Throwable $exception + * @return void + */ + public function report(Throwable $exception) + { + // + } + /** * Convert an authentication exception into a response. * @@ -92,9 +103,7 @@ private function renderCustomResponse(Throwable $exception) if ($exception instanceof ModelNotFoundException) { return $this->response($path, 404); - } - - if ($exception instanceof PDOException) { + } elseif ($exception instanceof PDOException || $exception instanceof \ParseError) { return $this->response($path, 500); } }