From 49256148ca2aa8fef1dd0e3aba35a895882b0f83 Mon Sep 17 00:00:00 2001 From: LadyCailin Date: Wed, 4 Sep 2019 22:42:41 +0200 Subject: [PATCH] Add better logging for an Error thrown in optimize --- src/main/java/com/laytonsmith/core/MethodScriptCompiler.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/laytonsmith/core/MethodScriptCompiler.java b/src/main/java/com/laytonsmith/core/MethodScriptCompiler.java index 59744a375..828bc23d0 100644 --- a/src/main/java/com/laytonsmith/core/MethodScriptCompiler.java +++ b/src/main/java/com/laytonsmith/core/MethodScriptCompiler.java @@ -2314,6 +2314,8 @@ private static void optimize(ParseTree tree, Environment env, } catch (ConfigRuntimeException e) { //Turn it into a compile exception, then rethrow throw new ConfigCompileException(e); + } catch (Error t) { + throw new Error("The linked Error had a code target on or around " + tree.getData().getTarget(), t); } if(tempNode == Optimizable.PULL_ME_UP) { if(tree.hasChildren()) {