*
* throw $this->createNotFoundException('Page not found!');
*/
protected function createNotFoundException(string $message = 'Not Found', \Throwable $previous = null): NotFoundHttpException
{
return new NotFoundHttpException($message, $previous);
}
/**
* Returns an AccessDeniedException.
*
return new RedirectResponse('/bundles/pimcoreadmin/img/filetype-not-supported.svg');
}
}
}
throw $this->createNotFoundException('Asset not found');
}
/**
* @param Request $request
*
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);
$controller = $event->getController();
$arguments = $event->getArguments();
// call controller
$response = $controller(...$arguments);
// view
if (!$response instanceof Response) {
$event = new ViewEvent($this, $request, $type, $response);
$this->dispatcher->dispatch($event, KernelEvents::VIEW);
{
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
$this->requestStack->push($request);
try {
return $this->handleRaw($request, $type);
} catch (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
$this->boot();
++$this->requestStackSize;
$this->resetServices = true;
try {
return $this->getHttpKernel()->handle($request, $type, $catch);
} finally {
--$this->requestStackSize;
}
}
$kernel = \Pimcore\Bootstrap::kernel();
// reset current request - will be read from request stack from now on
Tool::setCurrentRequest(null);
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
No log messages
NotFoundHttpException
|
---|
Symfony\Component\HttpKernel\Exception\NotFoundHttpException: Asset not found at vendor/symfony/framework-bundle/Controller/AbstractController.php:340 at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->createNotFoundException() (vendor/pimcore/pimcore/bundles/CoreBundle/Controller/PublicServicesController.php:205) at Pimcore\Bundle\CoreBundle\Controller\PublicServicesController->thumbnailAction() (vendor/symfony/http-kernel/HttpKernel.php:163) at Symfony\Component\HttpKernel\HttpKernel->handleRaw() (vendor/symfony/http-kernel/HttpKernel.php:75) at Symfony\Component\HttpKernel\HttpKernel->handle() (vendor/symfony/http-kernel/Kernel.php:202) at Symfony\Component\HttpKernel\Kernel->handle() (public/index.php:36) |