}
private void writeError(EvalError evalError) {
output.append("<Evaluation Error>\n" + evalError);
if (evalError instanceof TargetError) {
TargetError te = (TargetError) evalError;
StringWriter wr = new StringWriter();
Throwable target = te.getTarget();
target.printStackTrace(new PrintWriter(wr));
String text = wr.toString();
output.append("\n" + text);
}
}