Skip to content

Commit

Permalink
fix(#44): better logging
Browse files Browse the repository at this point in the history
  • Loading branch information
maxonfjvipon committed Jan 19, 2024
1 parent 762f2eb commit 02aebc0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/java/org/eolang/ineo/FuseMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,10 @@ public void execute() {
try {
new Saved(before, path).value();
} catch (final IOException ex) {
throw new IllegalStateException("Couldn't save file to output directory", ex);
throw new IllegalStateException(
String.format("Couldn't rewrite XMIR to output directory: %s", path),
ex
);
}
} else {
Logger.info(this, "Found fuse optimization in %s", file.getFileName());
Expand Down Expand Up @@ -132,7 +135,7 @@ public void execute() {
).save();
Logger.info(this, "New XMIR was generated: %s", generated);
} catch (final IOException ex) {
throw new IllegalStateException("Couldn't save file after transformation", ex);
throw new IllegalStateException("Couldn't save XMIR after transformation", ex);
} catch (final ImpossibleModificationException ex) {
throw new IllegalStateException("Couldn't transform fused XMIR", ex);
}
Expand Down

0 comments on commit 02aebc0

Please sign in to comment.