script.setNodeVersion(version);
Future<ScriptStatus> exec;
try {
exec = script.execute();
ScriptStatus status = exec.get(timeout, TimeUnit.SECONDS);
exitCode = status.getExitCode();
if (status.hasCause()) {
Throwable cause = status.getCause();
if (cause instanceof JavaScriptException) {
Object value = ((JavaScriptException) cause).getValue();
Context cx = Context.enter();
System.err.println(Context.toString(value));