Skip to content

Commit

Permalink
Fix handleError for null errors
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxNeedsSnacks committed Oct 6, 2024
1 parent d4ec215 commit e7fbbf2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/dev/latvian/mods/kubejs/script/ConsoleJS.java
Original file line number Diff line number Diff line change
Expand Up @@ -543,12 +543,12 @@ public void printObject(@Nullable Object o) {
printObject(o, false);
}

public void handleError(ConsoleLine line, Throwable error, @Nullable Pattern exitPattern, boolean print) {
public void handleError(ConsoleLine line, @Nullable Throwable error, @Nullable Pattern exitPattern, boolean print) {
while (error instanceof WrappedException ex) {
error = ex.getWrappedException();
}

if (error instanceof EcmaError) {
if (error == null || error instanceof EcmaError) {
return;
}

Expand Down

0 comments on commit e7fbbf2

Please sign in to comment.