while (error != null) {
String token = String.valueOf((new Date()).getTime());
stack.appendHtmlConstant("Token: " + token + "<br> ");
stack.appendEscaped(String.valueOf(error.getMessage())).appendHtmlConstant("<br>");
for (StackTraceElement elt : error.getStackTrace()) {
stack.appendHtmlConstant(" ")
.appendEscaped(maybe(elt.getClassName(), "??")).appendHtmlConstant(".") //
.appendEscaped(maybe(elt.getMethodName(), "??")).appendHtmlConstant(" (") //
.appendEscaped(maybe(elt.getFileName(), "??")).appendHtmlConstant(":") //
.appendEscaped(maybe(elt.getLineNumber(), "??")).appendHtmlConstant(")") //
.appendHtmlConstant("<br>");