Skip to content

Commit

Permalink
Merge pull request #1262 from pyrech/pass-exception
Browse files Browse the repository at this point in the history
Pass catched exception to give more insight on the original problem
  • Loading branch information
dbu authored Jan 23, 2020
2 parents 06740a0 + 5ba8a82 commit 3fc8732
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Controller/ImagineController.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ private function createRedirectResponse(\Closure $url, string $path, string $fil
return new RedirectResponse($this->dataManager->getDefaultImageUrl($filter));
}

throw new NotFoundHttpException(sprintf('Source image for path "%s" could not be found', $path));
throw new NotFoundHttpException(sprintf('Source image for path "%s" could not be found', $path), $exception);
} catch (NonExistingFilterException $exception) {
throw new NotFoundHttpException(sprintf('Requested non-existing filter "%s"', $filter));
throw new NotFoundHttpException(sprintf('Requested non-existing filter "%s"', $filter), $exception);
} 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,
Expand Down

0 comments on commit 3fc8732

Please sign in to comment.