throw new ResourceNotFoundException(
"Function \"javascript:" + funName + "()\" not found");
}
ScriptRuntime.call(context, fun, thrScope, funArgs, thrScope);
} catch (JavaScriptException ex) {
EvaluatorException ee = Context.reportRuntimeError(
ToolErrorReporter.getMessage("msg.uncaughtJSException",
ex.getMessage()));
Throwable unwrapped = unwrap(ex);
if (unwrapped instanceof ProcessingException) {
throw (ProcessingException)unwrapped;
}
throw new CascadingRuntimeException(ee.getMessage(),
unwrapped);
} catch (EcmaError ee) {
String msg = ToolErrorReporter.getMessage(
"msg.uncaughtJSException", ee.toString());
if (ee.getSourceName() != null) {
Context.reportRuntimeError(msg, ee.getSourceName(),
ee.getLineNumber(), ee.getLineSource(),
ee.getColumnNumber());
} else {
Context.reportRuntimeError(msg);
}
throw new CascadingRuntimeException(ee.getMessage(), ee);
} finally {
updateSession(environment, thrScope);
if (cocoon != null) {
cocoon.popCallContext();
}