/**
   * Shows an error and a short description.
   *
   * @param ex the exception
   */
  static void showError(Throwable ex, String title, String message) {
    try {
      if (title == null) title = "Error in SIP contactlist storage";

      if (message == null)
        message = title + "\n" + ex.getClass().getName() + ": " + ex.getLocalizedMessage();

      if (SipActivator.getUIService() != null)
        SipActivator.getUIService()
            .getPopupDialog()
            .showMessagePopupDialog(message, title, PopupDialog.ERROR_MESSAGE);
    } catch (Throwable t) {
      logger.error("Error for error dialog", t);
    }
  }