From e7fbbf2e3700ceae90fa72a414b546d2f741768f Mon Sep 17 00:00:00 2001 From: "max." Date: Sun, 6 Oct 2024 20:31:14 +0200 Subject: [PATCH] Fix handleError for null errors --- src/main/java/dev/latvian/mods/kubejs/script/ConsoleJS.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/dev/latvian/mods/kubejs/script/ConsoleJS.java b/src/main/java/dev/latvian/mods/kubejs/script/ConsoleJS.java index f82290c64..2cabdaa71 100644 --- a/src/main/java/dev/latvian/mods/kubejs/script/ConsoleJS.java +++ b/src/main/java/dev/latvian/mods/kubejs/script/ConsoleJS.java @@ -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; }