exceptionItem.setWidth(200);
exceptionItem.setMinValue(0);
exceptionItem.setMaxValue(10);
exceptionItem.setDefaultValue(0);
final TextItem conciseMessageItem = new TextItem("conciseMessage", "Concise Message");
conciseMessageItem.setWidth(200);
conciseMessageItem.setValue("A concise message string.");
final TextItem detailsMessageItem = new TextItem("detailsMessage", "Details or Root Cause Message");
detailsMessageItem.setWidth(200);
detailsMessageItem.setValue("The details or the inner-most exception message.");
ButtonItem button = new ButtonItem("showMessage", "Show Message");
button.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
EnumSet<Option> options = EnumSet.noneOf(Option.class);
String[] optionsArray = optionMenu.getValues();
if (optionsArray != null && optionsArray.length > 0) {
for (String optString : optionsArray) {
options.add(Option.valueOf(optString));
}
}
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--) {