Skip to content

Commit

Permalink
#3735: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Dec 23, 2024
1 parent f9d7a3c commit e890293
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 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")
@SuppressWarnings({"PMD.AvoidCatchingGenericException", "PMD.PreserveStackTrace"})
private <T> T through(final Action<T> action, final String suffix) {
try {
return action.act();
Expand All @@ -201,9 +201,10 @@ private <T> T through(final Action<T> 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(": ")
Expand Down

0 comments on commit e890293

Please sign in to comment.