summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--application/exceptions/ApiException.php4
-rw-r--r--application/libraries/Image/Drivers/imagemagick.php2
2 files changed, 3 insertions, 3 deletions
diff --git a/application/exceptions/ApiException.php b/application/exceptions/ApiException.php
index b3b9decff..b1ec96117 100644
--- a/application/exceptions/ApiException.php
+++ b/application/exceptions/ApiException.php
@@ -10,9 +10,9 @@ class ApiException extends \Exception {
private $error_id;
private $data;
- public function __construct($error_id, $message, $data = null)
+ public function __construct($error_id, $message, $data = null, $previous = null)
{
- parent::__construct($message);
+ parent::__construct($message, 0, $previous);
$this->error_id = $error_id;
$this->data = $data;
diff --git a/application/libraries/Image/Drivers/imagemagick.php b/application/libraries/Image/Drivers/imagemagick.php
index e37b9c8b3..fb4e4d88f 100644
--- a/application/libraries/Image/Drivers/imagemagick.php
+++ b/application/libraries/Image/Drivers/imagemagick.php
@@ -72,7 +72,7 @@ class imagemagick implements \libraries\Image\ImageDriver {
try {
$ret = (new \libraries\ProcRunner($command))->execSafe();
} catch (\exceptions\ApiException $e) {
- throw new \exceptions\ApiException("libraries/Image/thumbnail-creation-failed", "Failed to create thumbnail");
+ throw new \exceptions\ApiException("libraries/Image/thumbnail-creation-failed", "Failed to create thumbnail", null, $e);
}
return $ret["stdout"];