Skip to content
Snippets Groups Projects

Issue #3341224: Always catch \Throwable, not \Exception and always pass the old exception when re-throwing.

Merged Issue #3341224: Always catch \Throwable, not \Exception and always pass the old exception when re-throwing.
All threads resolved!
All threads resolved!
Files
3
@@ -45,8 +45,8 @@ final class ComposerSettingsValidator implements EventSubscriberInterface {
try {
$setting = (int) $this->inspector->getConfig('secure-http', $dir);
}
catch (\Exception $exception) {
$event->addErrorFromThrowable($exception, $this->t('Unable to determine Composer <code>secure-http</code> setting.'));
catch (\Throwable $throwable) {
$event->addErrorFromThrowable($throwable, $this->t('Unable to determine Composer <code>secure-http</code> setting.'));
return;
}
if ($setting !== 1) {
Loading