Class ErrorHandlerFactory

  • public class ErrorHandlerFactory
    extends java.lang.Object
    • Field Detail

      • stdLogger

        public static final org.slf4j.Logger stdLogger
      • noLogger

        public static final org.slf4j.Logger noLogger
      • errorHandlerStd

        public static final ErrorHandler errorHandlerStd
        Standard error handler - logs to stdLogger
      • errorHandlerNoWarnings

        public static final ErrorHandler errorHandlerNoWarnings
        Error handler (no warnings) - logs to stdLogger
      • errorHandlerStrict

        public static final ErrorHandler errorHandlerStrict
        Strict error handler - logs to stdLogger - exceptions for warnings
      • errorHandlerWarn

        public static final ErrorHandler errorHandlerWarn
        Warning error handler - logs to stdLogger - messages for warnings and some errors
      • errorHandlerNoLogging

        public static final ErrorHandler errorHandlerNoLogging
        Silent error handler : ignores warnings, throws exceptions for errors
      • errorHandlerStrictNoLogging

        public static final ErrorHandler errorHandlerStrictNoLogging
        Silent, strict error handler
    • Constructor Detail

      • ErrorHandlerFactory

        public ErrorHandlerFactory()
    • Method Detail

      • errorHandlerStrictSilent

        public static ErrorHandler errorHandlerStrictSilent()
        Silent, strict error handler, no logging
      • errorHandlerStrict

        public static ErrorHandler errorHandlerStrict​(org.slf4j.Logger log)
        Strict error handler, with logging
      • errorHandlerStd

        public static ErrorHandler errorHandlerStd​(org.slf4j.Logger log)
        An error handler that logs messages, then throws exceptions for errors but not warnings
      • errorHandlerIgnoreWarnings

        public static ErrorHandler errorHandlerIgnoreWarnings​(org.slf4j.Logger log)
        An error handler that logs error and fatal messages, but not warnings
      • errorHandlerWarning

        public static ErrorHandler errorHandlerWarning​(org.slf4j.Logger log)
        An error handler that logs messages for errors and warnings and attempts to carry on
      • errorHandlerSimple

        public static ErrorHandler errorHandlerSimple()
        Ignores warnings, throws exceptions for errors
      • errorHandlerTracking

        public static ErrorHandlerFactory.ErrorHandlerTracking errorHandlerTracking​(org.slf4j.Logger log,
                                                                                    boolean failOnError,
                                                                                    boolean failOnWarning)
        Logs warnings and errors while tracking the counts of each and optionally throwing exceptions when errors and/or warnings are encounted
      • errorHandlerDetailed

        public static ErrorHandler errorHandlerDetailed()
        An error handler that throws a RiotParseException, hence it exposes the details of errors.
      • errorHandlerExceptions

        public static ErrorHandler errorHandlerExceptions()
        An error handler that throws exceptions in all cases.
      • getDefaultErrorHandler

        public static ErrorHandler getDefaultErrorHandler()
        Get the current default error handler
      • setDefaultErrorHandler

        public static void setDefaultErrorHandler​(ErrorHandler errorHandler)
        Set the current default error handler - use carefully, mainly for use in testing