return $fullPath;
}
}
// If we got this far, nothing was found.
throw new RuntimeException(
"Could not find resource '$resource' in any resource paths."
. "(searched: " . join(", ", $this->searchPaths). ")"
);
}
}
}
$templateFile = $this->getResource("views/layout.html.php");
$cssFile = $this->getResource("css/whoops.base.css");
$zeptoFile = $this->getResource("js/zepto.min.js");
$prismJs = $this->getResource("js/prism.js");
$prismCss = $this->getResource("css/prism.css");
$clipboard = $this->getResource("js/clipboard.min.js");
$jsFile = $this->getResource("js/whoops.base.js");
// The HandlerInterface does not require an Exception passed to handle()
// and neither of our bundled handlers use it.
// However, 3rd party handlers may have already relied on this parameter,
// and removing it would be possibly breaking for users.
$handlerResponse = $handler->handle($exception);
// Collect the content type for possible sending in the headers.
$handlerContentType = method_exists($handler, 'contentType') ? $handler->contentType() : null;
if (in_array($handlerResponse, [Handler::LAST_HANDLER, Handler::QUIT])) {
$whoops->appendHandler($this->whoopsHandler());
$whoops->writeToOutput(false);
$whoops->allowQuit(false);
})->handleException($e);
}
/**
* Get the Whoops handler for the application.
*
*/
protected function renderExceptionContent(Throwable $e)
{
try {
return config('app.debug') && class_exists(Whoops::class)
? $this->renderExceptionWithWhoops($e)
: $this->renderExceptionWithSymfony($e, config('app.debug'));
} catch (Exception $e) {
return $this->renderExceptionWithSymfony($e, config('app.debug'));
}
}
* @return \Symfony\Component\HttpFoundation\Response
*/
protected function convertExceptionToResponse(Throwable $e)
{
return new SymfonyResponse(
$this->renderExceptionContent($e),
$this->isHttpException($e) ? $e->getStatusCode() : 500,
$this->isHttpException($e) ? $e->getHeaders() : []
);
}
* @return \Symfony\Component\HttpFoundation\Response
*/
protected function prepareResponse($request, Throwable $e)
{
if (! $this->isHttpException($e) && config('app.debug')) {
return $this->toIlluminateResponse($this->convertExceptionToResponse($e), $e);
}
if (! $this->isHttpException($e)) {
$e = new HttpException(500, $e->getMessage());
}
return $this->convertValidationExceptionToResponse($e, $request);
}
return $request->expectsJson()
? $this->prepareJsonResponse($request, $e)
: $this->prepareResponse($request, $e);
}
/**
* Prepare exception for rendering.
*
public function render($request, Throwable $exception)
{
if ($exception instanceof \Symfony\Component\HttpKernel\Exception\NotFoundHttpException) {
return redirect('/');
}
return parent::render($request, $exception);
}
}
* @param \Throwable $e
* @return void
*/
protected function renderHttpResponse(Throwable $e)
{
$this->getExceptionHandler()->render($this->app['request'], $e)->send();
}
/**
* Handle the PHP shutdown event.
*
}
if ($this->app->runningInConsole()) {
$this->renderForConsole($e);
} else {
$this->renderHttpResponse($e);
}
}
/**
* Render an exception to the console.
* @return void
*/
public function handleShutdown()
{
if (! is_null($error = error_get_last()) && $this->isFatal($error['type'])) {
$this->handleException($this->fatalErrorFromPhpError($error, 0));
}
}
/**
* Create a new fatal error instance from an error array.
RuntimeException
|
---|
RuntimeException: Could not find resource 'js/zepto.min.js' in any resource paths.(searched: /home/safegua2/public_html/vendor/filp/whoops/src/Whoops/Handler/../Resources) at /home/safegua2/public_html/vendor/filp/whoops/src/Whoops/Handler/PrettyPageHandler.php:713 at Whoops\Handler\PrettyPageHandler->getResource('js/zepto.min.js') (/home/safegua2/public_html/vendor/filp/whoops/src/Whoops/Handler/PrettyPageHandler.php:204) at Whoops\Handler\PrettyPageHandler->handle(object(FatalError)) (/home/safegua2/public_html/vendor/filp/whoops/src/Whoops/Run.php:398) at Whoops\Run->handleException(object(FatalError)) (/home/safegua2/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:364) at Illuminate\Foundation\Exceptions\Handler->renderExceptionWithWhoops(object(FatalError)) (/home/safegua2/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:343) at Illuminate\Foundation\Exceptions\Handler->renderExceptionContent(object(FatalError)) (/home/safegua2/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:327) at Illuminate\Foundation\Exceptions\Handler->convertExceptionToResponse(object(FatalError)) (/home/safegua2/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:306) at Illuminate\Foundation\Exceptions\Handler->prepareResponse(object(Request), object(FatalError)) (/home/safegua2/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php:211) at Illuminate\Foundation\Exceptions\Handler->render(object(Request), object(FatalError)) (/home/safegua2/public_html/app/Exceptions/Handler.php:56) at App\Exceptions\Handler->render(object(Request), object(FatalError)) (/home/safegua2/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:119) at Illuminate\Foundation\Bootstrap\HandleExceptions->renderHttpResponse(object(FatalError)) (/home/safegua2/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:96) at Illuminate\Foundation\Bootstrap\HandleExceptions->handleException(object(FatalError)) (/home/safegua2/public_html/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:130) at Illuminate\Foundation\Bootstrap\HandleExceptions->handleShutdown() |