} catch (InvocationTargetException e) {
throw new RuntimeException(e);
}
// Add a log object
ScriptableObject.putProperty(scope, "log", new JSLog());
// Compile user-specified function
try {
viewFun = view.compileFunction(context, scope);
} catch (final RhinoException e) {