(String) callFunctionOnObject("return locator.name+': '+locator.message;", result
.getObjectValue().getObjectID(), true);
} catch (Exception e) {
// If we get an exception while trying to get the message just throw
// a generic Ecmascript exception.
throw new ScopeException("Ecmascript exception");
}
// Throw the ecmascript exception
throw new ScopeException("Ecmascript exception:\n" + message);
}
// TODO: What is the best approach here?
else if (status.equals("cancelled-by-scheduler")) {
return null;
}