From e89029367ca7cff5ede187b5a757e47a0374eeae Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Mon, 23 Dec 2024 16:51:58 +0300 Subject: [PATCH] #3735: fix --- eo-runtime/src/main/java/org/eolang/PhSafe.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/eo-runtime/src/main/java/org/eolang/PhSafe.java b/eo-runtime/src/main/java/org/eolang/PhSafe.java index db1329bab4..6860dfbbaa 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") + @SuppressWarnings({"PMD.AvoidCatchingGenericException", "PMD.PreserveStackTrace"}) private T through(final Action action, final String suffix) { try { return action.act(); @@ -201,9 +201,10 @@ private T through(final Action action, final String suffix) { final StackTraceElement[] stack = ex.getStackTrace(); if (stack != null && stack.length > 0) { final StackTraceElement last = stack[0]; - msg.append(last.getFileName()).append(':') - .append(last.getLineNumber()).append(':') - .append(' '); + msg.append(last.getFileName()) + .append(':') + .append(last.getLineNumber()) + .append(": "); } msg.append(ex.getClass().getSimpleName()) .append(": ")