}
Severity severity = Severity.valueOf(severityMenu.getValueAsString());
String conciseMessage = conciseMessageItem.getValueAsString();
String detailsMessage = detailsMessageItem.getValueAsString();
Message msg;
Number exceptionDepth = (Number) exceptionItem.getValue();
if (exceptionDepth != null && exceptionDepth.intValue() > 0) {
Throwable t = null;
for (int depth = exceptionDepth.intValue(); depth > 0; depth--) {
if (t == null) {
t = new Throwable(detailsMessage);
} else {
t = new Throwable("Exception at depth #" + depth, t);
}
}
msg = new Message(conciseMessage, t, severity, options);
} else {
msg = new Message(conciseMessage, detailsMessage, severity, options);
}
CoreGUI.getMessageCenter().notify(msg);
}
});