fix code style of try catch blocks
This commit is contained in:
parent
d84d8f7108
commit
640253fa31
|
@ -84,7 +84,7 @@ try{
|
||||||
$preview->setScalingUp($scalingUp);
|
$preview->setScalingUp($scalingUp);
|
||||||
|
|
||||||
$preview->show();
|
$preview->show();
|
||||||
}catch(\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
\OC_Response::setStatus(500);
|
\OC_Response::setStatus(500);
|
||||||
\OC_Log::write('core', $e->getmessage(), \OC_Log::ERROR);
|
\OC_Log::write('core', $e->getmessage(), \OC_Log::ERROR);
|
||||||
\OC\Preview::showErrorPreview();
|
\OC\Preview::showErrorPreview();
|
||||||
|
|
|
@ -35,7 +35,7 @@ class Office extends Provider {
|
||||||
try{
|
try{
|
||||||
$pdf = new \imagick($absPath . '.pdf' . '[0]');
|
$pdf = new \imagick($absPath . '.pdf' . '[0]');
|
||||||
$pdf->setImageFormat('jpg');
|
$pdf->setImageFormat('jpg');
|
||||||
}catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
unlink($absPath);
|
unlink($absPath);
|
||||||
unlink($absPath . '.pdf');
|
unlink($absPath . '.pdf');
|
||||||
\OC_Log::write('core', $e->getmessage(), \OC_Log::ERROR);
|
\OC_Log::write('core', $e->getmessage(), \OC_Log::ERROR);
|
||||||
|
|
|
@ -22,7 +22,7 @@ if (extension_loaded('imagick')) {
|
||||||
try{
|
try{
|
||||||
$pdf = new \imagick($tmpPath . '[0]');
|
$pdf = new \imagick($tmpPath . '[0]');
|
||||||
$pdf->setImageFormat('jpg');
|
$pdf->setImageFormat('jpg');
|
||||||
}catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
\OC_Log::write('core', $e->getmessage(), \OC_Log::ERROR);
|
\OC_Log::write('core', $e->getmessage(), \OC_Log::ERROR);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,7 +27,7 @@ if (extension_loaded('imagick')) {
|
||||||
|
|
||||||
$svg->readImageBlob($content);
|
$svg->readImageBlob($content);
|
||||||
$svg->setImageFormat('jpg');
|
$svg->setImageFormat('jpg');
|
||||||
}catch(\Exception $e){
|
} catch (\Exception $e) {
|
||||||
\OC_Log::write('core', $e->getmessage(), \OC_Log::ERROR);
|
\OC_Log::write('core', $e->getmessage(), \OC_Log::ERROR);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue