Skip to content

Commit

Permalink
#3668 no deletion of messages
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Dec 15, 2024
1 parent 15c4701 commit 6f6a457
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 1 addition & 5 deletions eo-runtime/src/main/java/org/eolang/PhSafe.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,9 @@ private static <T> T through(final Action<T> action) {
try {
return action.act();
} catch (final ExFailure ex) {
final List<String> before = PhSafe.messages(ex);
if (!before.isEmpty()) {
before.remove(0);
}
throw new EOerror.ExError(
new Data.ToPhi(PhSafe.message(ex)),
before
PhSafe.messages(ex)
);
}
}
Expand Down
4 changes: 2 additions & 2 deletions eo-runtime/src/test/java/org/eolang/DataizedTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ void logsAllLocationsWithPhSafe() {
logs.get(0).getMessage(),
Matchers.allOf(
Matchers.containsString("1) Error in"),
Matchers.containsString("2) \"There's"),
Matchers.not(Matchers.containsString("3)")),
Matchers.containsString("2) There's"),
Matchers.containsString("3)"),
Matchers.containsString("at foo.bar:0:0"),
Matchers.containsString("no data in the object, can't take it")
)
Expand Down

0 comments on commit 6f6a457

Please sign in to comment.