From 932d439444f10774bff546923cc0a2e5e2f2857b Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Fri, 20 Jul 2018 13:57:57 +0200 Subject: Rewrite (only for backend/oauth/api use from now on) --- app/Exceptions/Handler.php | 17 ----------------- 1 file changed, 17 deletions(-) mode change 100755 => 100644 app/Exceptions/Handler.php (limited to 'app/Exceptions/Handler.php') diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php old mode 100755 new mode 100644 index f1078a9..043cad6 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -4,8 +4,6 @@ namespace App\Exceptions; use Exception; use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; -use Illuminate\Support\Facades\View; -use \Symfony\Component\HttpKernel\Exception\HttpException; class Handler extends ExceptionHandler { @@ -48,21 +46,6 @@ class Handler extends ExceptionHandler */ public function render($request, Exception $exception) { - if ($exception instanceof HttpException) { - $statusCode = $exception->getStatusCode(); - switch ($statusCode) { - case '404': - $codeMessage = 'Page could not be found.'; - } - $errorMessage = $exception->getMessage() == '' ? (isset($codeMessage) ? $codeMessage : 'An unknown error occurred.') : $exception->getMessage(); - - - return response(View::make('errors.http', [ - 'ErrorMessage' => $errorMessage, - 'ErrorCode' => $statusCode - ]), $statusCode); - } - return parent::render($request, $exception); } } -- cgit v1.2.3