Class ExceptionHandler

java.lang.Object
com.compomics.util.exceptions.ExceptionHandler
Direct Known Subclasses:
CommandLineExceptionHandler, FrameExceptionHandler, WaitingDialogExceptionHandler

public abstract class ExceptionHandler
extends Object
Interface for the general handling of exceptions.
Author:
Marc Vaudel
  • Field Details

  • Constructor Details

  • Method Details

    • catchException

      public void catchException​(Exception e)
      Catches an exception and informs the user.
      Parameters:
      e - the exception caught
    • notifyUser

      protected abstract void notifyUser​(Exception e)
      Notifies the user that an exception was caught.
      Parameters:
      e - the exception to catch
    • getExceptionType

      public static String getExceptionType​(Exception e)
      Returns the exception type.
      Parameters:
      e - the exception to get the type fro
      Returns:
      the exception type as a string
    • setIgnoreExceptions

      public void setIgnoreExceptions​(boolean ignoreExceptions)
      Sets whether exceptions should be ignored.
      Parameters:
      ignoreExceptions - if true exceptions will be ignored