public function render($exception) { if (!$exception instanceof Exception) { return; } # - you may also want to extract the error for other purpose # such as logging it to your slack notification or bugsnag // ... notifications | bugsnag | etc... # - the code below will print a symfony debugging ui parent::render($exception); # - the code below will be your custom error view // echo View::take('errors.whoops', [ // 'exception' => $exception, // ]); // exit; }
public function render($e, $status_code = null) { if (headers_sent()) { return; } if ($e instanceof AccessNotAllowedException) { return (new CsrfHandler())->handle($e); } if ($e instanceof ControllerNotFoundException) { if (config()->app->debug) { return parent::render($e, PageNotFoundHandler::STATUS_CODE); } return (new PageNotFoundHandler())->handle($e); } # you may also want to extract the error for other purpose # such as logging it to your slack bot notifier or using # bugsnag // ... notifications | bugsnag | etc... if (!config()->app->debug && is_cli() === false) { return (new FatalHandler())->handle($e); } return parent::render($e); }
public function report() { parent::report(); }