Exemplo n.º 1
0
 public static void log(final Throwable e) {
   log(
       new Status(
           IStatus.ERROR,
           PLUGIN_ID,
           ErlangStatus.INTERNAL_ERROR.getValue(),
           "Erlide internal error",
           e));
 }
Exemplo n.º 2
0
 public static void log(final Exception e) {
   log(
       new Status(
           IStatus.ERROR,
           PLUGIN_ID,
           ErlangStatus.INTERNAL_ERROR.getValue(),
           e.getMessage(),
           null));
 }
Exemplo n.º 3
0
 public static void logErrorStatus(final String message, final IStatus status) {
   if (status == null) {
     logErrorMessage(message);
     return;
   }
   final MultiStatus multi =
       new MultiStatus(PLUGIN_ID, ErlangStatus.INTERNAL_ERROR.getValue(), message, null);
   multi.add(status);
   log(multi);
 }
Exemplo n.º 4
0
 /** Utility method with conventions */
 public static void errorDialog(
     final Shell shell, final String title, String message, final Throwable t) {
   IStatus status;
   if (t instanceof CoreException) {
     status = ((CoreException) t).getStatus();
     // if the 'message' resource string and the IStatus' message are the
     // same,
     // don't show both in the dialog
     if (status != null && message.equals(status.getMessage())) {
       message = null;
     }
   } else {
     status =
         new Status(
             IStatus.ERROR,
             PLUGIN_ID,
             IDebugUIConstants.INTERNAL_ERROR,
             "Error within Debug UI: ",
             t); //$NON-NLS-1$
     log(status);
   }
   ErrorDialog.openError(shell, title, message, status);
 }
Exemplo n.º 5
0
 public static void logErrorMessage(final String message) {
   log(
       new Status(
           IStatus.ERROR, PLUGIN_ID, ErlangStatus.INTERNAL_ERROR.getValue(), message, null));
 }