Access simple bindings directly instead of accessing them via the Groovy engine
This commit is contained in:
parent
7afe232264
commit
a589cb1dcd
|
@ -270,7 +270,13 @@ public class ExpressionFormat extends Format {
|
|||
@Override
|
||||
public Object eval(ScriptContext context) throws ScriptException {
|
||||
try {
|
||||
return context.getAttribute(name);
|
||||
Object value = context.getAttribute(name);
|
||||
if (value == null) {
|
||||
throw new MissingPropertyException(name, Variable.class);
|
||||
}
|
||||
return value;
|
||||
} catch (Exception e) {
|
||||
throw new ScriptException(e);
|
||||
} catch (Throwable t) {
|
||||
throw new ScriptException(new ExecutionException(t));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue