diff --git a/Binary/Loader/StreamLoader.php b/Binary/Loader/StreamLoader.php index 504873711..a1525e6d0 100644 --- a/Binary/Loader/StreamLoader.php +++ b/Binary/Loader/StreamLoader.php @@ -61,7 +61,7 @@ public function find($path) try { $content = file_get_contents($name, null, $this->context); } catch (\Exception $e) { - throw new NotLoadableException(sprintf('Source image %s could not be loaded.', $name), $e); + throw new NotLoadableException(sprintf('Source image %s could not be loaded.', $name), $e->getCode(), $e); } if (false === $content) {