Class ExceptionHandler

java.lang.Object
org.eclipse.compare.internal.ExceptionHandler

public class ExceptionHandler extends Object
The default exception handler shows an error dialog when one of its handle methods is called. If the passed exception is a CoreException an error dialog pops up showing the exception's status information. For a InvocationTargetException a normal message dialog pops up showing the exception's message. Additionally the exception is written to the platform log.
  • Constructor Details

    • ExceptionHandler

      public ExceptionHandler()
  • Method Details

    • log

      public static void log(Throwable t, String message)
    • handle

      public static void handle(CoreException e, String title, String message)
      Handles the given CoreException. The workbench shell is used as a parent for the dialog window.
      Parameters:
      e - the CoreException to be handled
      title - the dialog window's window title
      message - message to be displayed by the dialog window
    • handle

      public static void handle(CoreException e, Shell parent, String title, String message)
      Handles the given CoreException.
      Parameters:
      e - the CoreException to be handled
      parent - the dialog window's parent shell
      title - the dialog window's window title
      message - message to be displayed by the dialog window
    • handle

      public static void handle(InvocationTargetException e, String title, String message)
      Handles the given InvocationTargetException. The workbench shell is used as a parent for the dialog window.
      Parameters:
      e - the InvocationTargetException to be handled
      title - the dialog window's window title
      message - message to be displayed by the dialog window
    • handle

      public static void handle(InvocationTargetException e, Shell parent, String title, String message)
      Handles the given InvocationTargetException.
      Parameters:
      e - the InvocationTargetException to be handled
      parent - the dialog window's parent shell
      title - the dialog window's window title
      message - message to be displayed by the dialog window
    • perform

      protected void perform(CoreException e, Shell shell, String title, String message)
    • perform

      protected void perform(InvocationTargetException e, Shell shell, String title, String message)