mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +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 {
|
} else {
|
||||||
return $imagick->getImageBlob();
|
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) {
|
} 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;
|
return false;
|
||||||
}
|
}
|
||||||
} elseif(extension_loaded('gd')) {
|
} elseif(extension_loaded('gd')) {
|
||||||
|
@ -102,6 +112,10 @@ class SeedDMS_ConversionServiceImageToImage extends SeedDMS_ConversionServiceBas
|
||||||
return $image;
|
return $image;
|
||||||
}
|
}
|
||||||
} else {
|
} 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;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,6 +83,10 @@ class SeedDMS_ConversionServicePdfToImage extends SeedDMS_ConversionServiceBase
|
||||||
} else {
|
} else {
|
||||||
return $imagick->getImageBlob();
|
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) {
|
} catch (ImagickException $e) {
|
||||||
if($this->logger) {
|
if($this->logger) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user