}
}
return new EmbedEvalUnitImpl(container, node, scope);
} catch (RaiseException e) {
runtime.printError(e.getException());
throw new ParseFailedException(e.getMessage(), e);
} catch (Throwable e) {
Writer w = container.getErrorWriter();
if (w instanceof PrintWriter) {
e.printStackTrace((PrintWriter)w);
} else {
try {
w.write(e.getMessage());
} catch (IOException ex) {
throw new ParseFailedException(ex);
}
}
throw new ParseFailedException(e);
} finally {
try {
if (input instanceof InputStream) {
((InputStream)input).close();
}
} catch (IOException ex) {
throw new ParseFailedException(ex);
}
}
}