Skip to content

Commit

Permalink
fixed exception
Browse files Browse the repository at this point in the history
  • Loading branch information
digitalkaoz committed Feb 7, 2014
1 parent 8bc47c3 commit 2254970
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Controller/ImagineController.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Liip\ImagineBundle\Controller;

use Imagine\Exception\RuntimeException;
use Liip\ImagineBundle\Imagine\Cache\CacheManager;
use Liip\ImagineBundle\Imagine\Data\DataManager;
use Liip\ImagineBundle\Imagine\Filter\FilterManager;
Expand Down Expand Up @@ -60,8 +59,8 @@ public function filterAction(Request $request, $path, $filter)
try {
$image = $this->dataManager->find($filter, $path);
$response = $this->filterManager->get($request, $filter, $image, $path);
} catch (RuntimeException $e) {
throw new RuntimeException('unable to create image for '.$path.' error was: '.$e->getMessage(), 0, $e);
} 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) {
Expand Down

0 comments on commit 2254970

Please sign in to comment.