/**
   * An error has occurred which we did not expect or did not know how to handle. The user is
   * alerted and given the option to send us feedback.
   *
   * @param title
   * @param message
   * @param details
   */
  public void showUnhandledErrorDialog(
      String title, String message, String details, Throwable cause) {
    Logger.getLogger(Application.class).error(message, cause);
    // This is where I should insert the request as to whether or not to mail an error
    try {
      String lastExceptionUUID =
          PreferencesManager.getPreferences(Application.class).get("errorMailer.last", "");
      String currentExceptionUUID = Util.getStackTraceUUID(cause);
      if (!lastExceptionUUID.equals(currentExceptionUUID)) {
        boolean sent = ErrorMailer.sendError(title, message, cause);
        if (sent) {
          PreferencesManager.getPreferences(Application.class)
              .put("errorMailer.last", currentExceptionUUID);
          PreferencesManager.getPreferences(Application.class).flush();
        }
      }
    } catch (Exception e) {
      e.printStackTrace();
      details +=
          "\n\nAnd an Exception while trying to mail the error.\n" + Util.getStackTraceString(e);
    }

    ErrorDialog dialog =
        details.length() > 0 ? new ErrorDialog(message, details) : new ErrorDialog(message);
    JOptionPane.showMessageDialog(
        getProjectExplorer(),
        dialog,
        title,
        JOptionPane.ERROR_MESSAGE,
        UIResourceManager.getIcon(UIResourceManager.ICON_ERROR));
  }
 public void showUnhandledErrorDialog(String title, String message, Throwable details) {
   showUnhandledErrorDialog(title, message, Util.getStackTraceString(details), details);
 }