From 308801dfe3710101e6a76d4efb24c0650934da87 Mon Sep 17 00:00:00 2001 From: antonsmolin Date: Wed, 2 Mar 2016 12:47:41 +0500 Subject: [PATCH] StreamLoader-exception-arguments Fix wrong arguments when throwing NotLoadableException. Previous exception must be third argument --- Binary/Loader/StreamLoader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {