Skip to content
Snippets Groups Projects

Issue #2583041: GD toolkit & operations should catch \Throwable to fail gracefully in case of errors

Closed Issue #2583041: GD toolkit & operations should catch \Throwable to fail gracefully in case of errors
Closed mondrake requested to merge issue/drupal-2583041:2583041-catch-throwable into 10.1.x
Files
7
@@ -127,8 +127,14 @@ public function apply($operation, array $arguments = []) {
$this->logger->error("The selected image handling toolkit '@toolkit' can not process operation '@operation'.", ['@toolkit' => $this->getPluginId(), '@operation' => $operation]);
return FALSE;
}
catch (\InvalidArgumentException $e) {
$this->logger->warning($e->getMessage(), []);
catch (\Throwable $t) {
$this->logger->warning("The image toolkit '@toolkit' failed processing '@operation' for image '@image'. Reported error: @class - @message", [
'@toolkit' => $this->getPluginId(),
'@operation' => $operation,
'@image' => $this->getSource(),
'@class' => get_class($t),
'@message' => $t->getMessage(),
]);
return FALSE;
}
}
Loading