}
}
} catch (Throwable t) {
- fail(holder, "thrown?", t);
+ fail(holder, "unexpected exception", t);
}
}
*/
protected String render(IMessage message) {
IMessage.Kind kind = message.getKind();
- if (kind.equals(IMessage.ABORT)) {
- Throwable t = message.getThrown();
- if (null == t) {
- return "abort (no message)";
- } else {
- return Main.renderExceptionForUser(t);
- }
- }
+
StringBuffer sb = new StringBuffer();
String text = message.getMessage();
+ if (text.equals(AbortException.NO_MESSAGE_TEXT)) {
+ text = null;
+ }
boolean toString = (LangUtil.isEmpty(text));
if (toString) {
text = message.toString();
sb.append(LangUtil.EOL);
sb.append(context);
}
+ Throwable thrown = message.getThrown();
+ if (null != thrown) {
+ sb.append(LangUtil.EOL);
+ sb.append(Main.renderExceptionForUser(thrown));
+ }
+
return sb.toString();
}