mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 07:22:11 +00:00
log errors and set $success to false
This commit is contained in:
parent
a05a0b9b49
commit
6b91d3ce40
|
@ -67,8 +67,18 @@ class SeedDMS_ConversionServiceImageToImage extends SeedDMS_ConversionServiceBas
|
|||
} else {
|
||||
return $imagick->getImageBlob();
|
||||
}
|
||||
} else {
|
||||
if($this->logger) {
|
||||
$this->logger->log('Conversion from '.$this->from.' to '.$this->to.' with image service failed: could not read input file.', PEAR_LOG_ERR);
|
||||
}
|
||||
$this->success = false;
|
||||
return false;
|
||||
}
|
||||
} catch (ImagickException $e) {
|
||||
if($this->logger) {
|
||||
$this->logger->log('Conversion from '.$this->from.' to '.$this->to.' with image service failed: '.$e->getMessage(), PEAR_LOG_ERR);
|
||||
}
|
||||
$this->success = false;
|
||||
return false;
|
||||
}
|
||||
} elseif(extension_loaded('gd')) {
|
||||
|
@ -102,6 +112,10 @@ class SeedDMS_ConversionServiceImageToImage extends SeedDMS_ConversionServiceBas
|
|||
return $image;
|
||||
}
|
||||
} else {
|
||||
if($this->logger) {
|
||||
$this->logger->log('Conversion from '.$this->from.' to '.$this->to.' with image service failed: could not read input file.', PEAR_LOG_ERR);
|
||||
}
|
||||
$this->success = false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -83,6 +83,10 @@ class SeedDMS_ConversionServicePdfToImage extends SeedDMS_ConversionServiceBase
|
|||
} else {
|
||||
return $imagick->getImageBlob();
|
||||
}
|
||||
} else {
|
||||
if($this->logger) {
|
||||
$this->logger->log('Conversion from '.$this->from.' to '.$this->to.' with pdf service failed: could not read input file.', PEAR_LOG_ERR);
|
||||
}
|
||||
}
|
||||
} catch (ImagickException $e) {
|
||||
if($this->logger) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user