showMessageDialog changed to return message from the exception