From 9e9d80270b3fe8a383b1072eaeb7a5caf1f69dc2 Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Mon, 23 Dec 2024 17:03:08 +0300 Subject: [PATCH] #3735: catch Throwable --- eo-runtime/src/main/java/org/eolang/PhSafe.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eo-runtime/src/main/java/org/eolang/PhSafe.java b/eo-runtime/src/main/java/org/eolang/PhSafe.java index 6860dfbbaa..c15c363160 100644 --- a/eo-runtime/src/main/java/org/eolang/PhSafe.java +++ b/eo-runtime/src/main/java/org/eolang/PhSafe.java @@ -185,7 +185,7 @@ private T through(final Action action) { * @return Result * @checkstyle IllegalCatchCheck (20 lines) */ - @SuppressWarnings({"PMD.AvoidCatchingGenericException", "PMD.PreserveStackTrace"}) + @SuppressWarnings({"PMD.AvoidCatchingThrowable", "PMD.PreserveStackTrace"}) private T through(final Action action, final String suffix) { try { return action.act(); @@ -196,7 +196,7 @@ private T through(final Action action, final String suffix) { new Data.ToPhi(ex.getMessage()), this.label(suffix) ); - } catch (final RuntimeException | Error ex) { + } catch (final Throwable ex) { final StringBuilder msg = new StringBuilder(0); final StackTraceElement[] stack = ex.getStackTrace(); if (stack != null && stack.length > 0) {