Function function = (Function)fObj;
try {
return function.call(rhinoContext, rhinoScope, rhinoScope, args);
} catch (RhinoException angryRhino) {
if (expectingException != null && angryRhino instanceof JavaScriptException) {
JavaScriptException jse = (JavaScriptException)angryRhino;
Assert.assertEquals(jse.getValue(), expectingException);
return null;
}
String trace = angryRhino.getScriptStackTrace();
Assert.fail("JavaScript error: " + angryRhino.toString() + " " + trace);
} catch (JavaScriptAssertionFailed assertion) {