Skip to content

Commit

Permalink
fix exception logging
Browse files Browse the repository at this point in the history
  • Loading branch information
brachy84 committed Dec 29, 2023
1 parent e00b08c commit 5d30f2b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ public void exception(Throwable throwable) {
writeLogLine("\t\tat " + line);
}
}
throwable.printStackTrace();
GroovyScript.LOGGER.throwing(throwable);
}

private List<String> prepareStackTrace(StackTraceElement[] stackTrace) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ public void run(LoadStage currentLoadStage) {
this.currentLoadStage = Objects.requireNonNull(currentLoadStage);
try {
super.load();
} catch (IOException | ScriptException | ResourceException | GroovyRuntimeException e) {
GroovyLog.get().errorMC("An exception occurred while trying to run groovy code!");
} catch (IOException | ScriptException | ResourceException e) {
GroovyLog.get().errorMC("An exception occurred while trying to run groovy code! This is might be a internal groovy issue.");
GroovyLog.get().exception(e);
} catch (Throwable t) {
GroovyLog.get().exception(t);
Expand Down

0 comments on commit 5d30f2b

Please sign in to comment.