diff --git a/Controller/ImagineController.php b/Controller/ImagineController.php index c2979924d..c92849b12 100644 --- a/Controller/ImagineController.php +++ b/Controller/ImagineController.php @@ -56,8 +56,12 @@ public function filterAction(Request $request, $path, $filter) return $targetPath; } - $image = $this->dataManager->find($filter, $path); - $response = $this->filterManager->get($request, $filter, $image, $path); + try { + $image = $this->dataManager->find($filter, $path); + $response = $this->filterManager->get($request, $filter, $image, $path); + } catch (\Imagine\Exception\RuntimeException $e) { + throw new \RuntimeException(sprintf('Unable to create image for path "%s" and filter "%s". Message was "%s"', $path, $filter, $e->getMessage()), 0, $e); + } if ($targetPath) { $response = $this->cacheManager->store($response, $targetPath, $filter);