Samrap\Kickstart\Exceptions\Handler::renderExceptionWithWhoops PHP Метод

renderExceptionWithWhoops() защищенный Метод

Render an exception using Whoops.
protected renderExceptionWithWhoops ( Exception $e, string $json = false ) : Illuminate\Http\Response
$e Exception The Exception object
$json string Whether to use the JsonResponseHandler instead of the PrettyPageHandler.
Результат Illuminate\Http\Response
    protected function renderExceptionWithWhoops(Exception $e, $json = false)
    {
        $whoops = new Whoops();
        if ($json) {
            $whoops->pushHandler(new JsonResponseHandler());
        } else {
            $whoops->pushHandler(new PrettyPageHandler());
        }
        return new Response($whoops->handleException($e), $e->getStatusCode(), $e->getHeaders());
    }