void (final Exception exc) { final Throwable cause = exc.getCause(); String message; if(cause != null){ message = cause.getMessage(); } else{ message = exc.getMessage(); } if (message == null || message.length() == 0) { message = UIDesignerBundle.message("error.no.message"); } Messages.showMessageDialog(UIDesignerBundle.message("error.setting.value", message), UIDesignerBundle.message("title.invalid.input"), Messages.getErrorIcon()); }