= "Could not handle exception: throwable is not an InvalidStateException:\n"
+ throwable.getClass().getName();
logger.error(ILLEGAL_THROWABLE_ARGUMENT);
return ILLEGAL_THROWABLE_ARGUMENT;
}
InvalidStateException invalidStateException = (InvalidStateException) throwable;
String explanation = messageSourceAccessor.getMessage(EXPLANATION_KEY, EXPLANATION_KEY);
JPanel panel = new JPanel(new BorderLayout());
JLabel explanationLabel = new JLabel(explanation);
panel.add(explanationLabel, BorderLayout.NORTH);
List<String> invalidValueMessageList = new ArrayList<String>();
for (InvalidValue invalidValue : invalidStateException.getInvalidValues()) {
StringBuffer messageBuffer = new StringBuffer();
String propertyName = invalidValue.getPropertyName();
messageBuffer.append(messageSourceAccessor.getMessage(propertyName + ".label", propertyName));
messageBuffer.append(" ");
messageBuffer.append(invalidValue.getMessage());