diff --git a/core/src/main/java/lucee/runtime/type/EnvUDF.java b/core/src/main/java/lucee/runtime/type/EnvUDF.java index 141d12e4bf..8a5a69e5f4 100644 --- a/core/src/main/java/lucee/runtime/type/EnvUDF.java +++ b/core/src/main/java/lucee/runtime/type/EnvUDF.java @@ -22,7 +22,6 @@ import java.io.ObjectInput; import java.io.ObjectOutput; -import lucee.print; import lucee.runtime.Component; import lucee.runtime.PageContext; import lucee.runtime.PageContextImpl; @@ -49,21 +48,12 @@ public EnvUDF() {// needed for externalize EnvUDF(UDFProperties properties) { super(properties); PageContext pc = ThreadLocalPageContext.get(); - try { - if (pc.undefinedScope().getCheckArguments()) { - this.variables = new ClosureScope(pc, pc.argumentsScope(), pc.localScope(), pc.variablesScope()); - } - else { - this.variables = pc.variablesScope(); - variables.setBind(true); - } + if (pc.undefinedScope().getCheckArguments()) { + this.variables = new ClosureScope(pc, pc.argumentsScope(), pc.localScope(), pc.variablesScope()); } - catch (NullPointerException e) { - - print.e(Thread.currentThread().getName() + " EnvUDF"); - print.e(e); - print.e(ThreadLocalPageContext.stacktraces.get(Thread.currentThread().getName())); - throw e; + else { + this.variables = pc.variablesScope(); + variables.setBind(true); } this.applicationContext = pc.getApplicationContext(); }