Class ExceptionHandlers

java.lang.Object
io.atlassian.fugue.retry.ExceptionHandlers

public class ExceptionHandlers extends Object
Provides some standard implementations of various exception actions. This class is not instantiable.
  • Field Details

    • log

      private static final org.slf4j.Logger log
  • Constructor Details

    • ExceptionHandlers

      private ExceptionHandlers()
  • Method Details

    • loggingExceptionHandler

      public static ExceptionHandler loggingExceptionHandler(org.slf4j.Logger logger)
      Retrieves an ExceptionHandler which will log exceptions passed in.
      Parameters:
      logger - the Logger to which exceptions will be logged; if it is null, a default Logger will be used. The default logger is the logger for the ExceptionHandlers class, but may change in future.
      Returns:
      an ExceptionHandler which will log (at WARN level) exceptions passed in
    • ignoreExceptionHandler

      public static ExceptionHandler ignoreExceptionHandler()

      ignoreExceptionHandler.

      Returns:
      an ExceptionHandler which does nothing
    • chain

      public static ExceptionHandler chain(ExceptionHandler... handlers)
      Chain a series of ExceptionHandlers together to be executed subsequently; if one throws an exception, subsequent handlers will not be executed.
      Parameters:
      handlers - the chain of handlers to chain
      Returns:
      an ExceptionHandler composing the supplied handlers
    • logger

      static org.slf4j.Logger logger()