if (!status.equals("completed")) {
if (status.equals("unhandled-exception")) {
// Would be great give the JS error here, but it appears that by the
// time we callFunctionOnObject the error object has gone...
throw new ScopeException("Ecmascript exception");
} else if (status.equals("cancelled-by-scheduler")) {
// TODO: what is the best approach here?
return null;
}
}