Exceptions
Exception
Symfony\Component\HttpKernel\Exception\ NotFoundHttpException
} catch (NotLoadableException $exception) {
if (null !== $this->dataManager->getDefaultImageUrl($filter)) {
return new RedirectResponse($this->dataManager->getDefaultImageUrl($filter));
}
throw new NotFoundHttpException(sprintf('Source image for path "%s" could not be found', $path));
} catch (NonExistingFilterException $exception) {
throw new NotFoundHttpException(sprintf('Requested non-existing filter "%s"', $filter));
} catch (RuntimeException $exception) {
throw new \RuntimeException(vsprintf('Unable to create image for path "%s" and filter "%s". Message was "%s"', [
$hash ? sprintf('%s/%s', $hash, $path) : $path,
public function filterAction(Request $request, $path, $filter)
{
$path = PathHelper::urlPathToFilePath($path);
$resolver = $request->get('resolver');
return $this->createRedirectResponse(function () use ($path, $filter, $resolver) {
return $this->filterService->getUrlOfFilteredImage($path, $filter, $resolver);
}, $path, $filter);
}
/**
$this->dispatcher->dispatch(KernelEvents::CONTROLLER_ARGUMENTS, $event);
$controller = $event->getController();
$arguments = $event->getArguments();
// call controller
$response = $controller(...$arguments);
// view
if (!$response instanceof Response) {
$event = new GetResponseForControllerResultEvent($this, $request, $type, $response);
$this->dispatcher->dispatch(KernelEvents::VIEW, $event);
public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
{
$request->headers->set('X-Php-Ob-Level', ob_get_level());
try {
return $this->handleRaw($request, $type);
} catch (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
Stack Trace
NotFoundHttpException |
---|
Symfony\Component\HttpKernel\Exception\NotFoundHttpException: Source image for path "images/parameters/6a98eedddb0eb6fc11c85d06b7d5d41e.jpg" could not be found at vendor/liip/imagine-bundle/Controller/ImagineController.php:147 at Liip\ImagineBundle\Controller\ImagineController->createRedirectResponse(object(Closure), 'images/parameters/6a98eedddb0eb6fc11c85d06b7d5d41e.jpg', 'textileThumb') (vendor/liip/imagine-bundle/Controller/ImagineController.php:91) at Liip\ImagineBundle\Controller\ImagineController->filterAction(object(Request), 'images/parameters/6a98eedddb0eb6fc11c85d06b7d5d41e.jpg', 'textileThumb') (vendor/symfony/http-kernel/HttpKernel.php:150) at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1) (vendor/symfony/http-kernel/HttpKernel.php:67) at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true) (vendor/symfony/http-kernel/Kernel.php:198) at Symfony\Component\HttpKernel\Kernel->handle(object(Request)) (public/index.php:49) |