throw Context.reportRuntimeError(
"getResource() requires a string argument");
}
RhinoEngine engine = ((RingoGlobal) funObj.getParentScope()).engine;
try {
Resource res = engine.findResource((String) args[0], null,
engine.getParentRepository(thisObj));
return cx.getWrapFactory().wrapAsJavaObject(cx, engine.getScope(),
res, null);
} catch (IOException iox) {
throw Context.reportRuntimeError("Cannot find resource " + args[0] + "'");