Skip to content

Commit

Permalink
#3735: catch Throwable
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Dec 23, 2024
1 parent e890293 commit 9e9d802
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions eo-runtime/src/main/java/org/eolang/PhSafe.java
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ private <T> T through(final Action<T> action) {
* @return Result
* @checkstyle IllegalCatchCheck (20 lines)
*/
@SuppressWarnings({"PMD.AvoidCatchingGenericException", "PMD.PreserveStackTrace"})
@SuppressWarnings({"PMD.AvoidCatchingThrowable", "PMD.PreserveStackTrace"})
private <T> T through(final Action<T> action, final String suffix) {
try {
return action.act();
Expand All @@ -196,7 +196,7 @@ private <T> T through(final Action<T> 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) {
Expand Down

0 comments on commit 9e9d802

Please sign in to comment.