Class SimpleErrorHandler

    • Constructor Summary

      Constructors 
      Constructor Description
      SimpleErrorHandler​(java.util.function.Consumer<java.lang.Throwable> handler)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void onSourceFailed​(java.lang.Throwable exception, @Nullable java.lang.Object service)
      Called when the Source failed to load given resource and threw an exception.
      void onTranslateFailed​(java.lang.Throwable exception, LoadedResource resource, @Nullable java.lang.Object service)
      Called when the Source started returning data, but eventually some error in the given Translator occurred.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SimpleErrorHandler

        public SimpleErrorHandler​(java.util.function.Consumer<java.lang.Throwable> handler)
    • Method Detail

      • onSourceFailed

        public void onSourceFailed​(java.lang.Throwable exception,
                                   @Nullable
                                   @Nullable java.lang.Object service)
        Description copied from interface: ErrorHandler
        Called when the Source failed to load given resource and threw an exception.
        Specified by:
        onSourceFailed in interface ErrorHandler
        Overrides:
        onSourceFailed in class AbstractErrorHandler
        Parameters:
        exception - an exception which was thrown by the source
        service - service un-proxied instance, can be null if no successful reload was done
      • onTranslateFailed

        public void onTranslateFailed​(java.lang.Throwable exception,
                                      LoadedResource resource,
                                      @Nullable
                                      @Nullable java.lang.Object service)
        Description copied from interface: ErrorHandler
        Called when the Source started returning data, but eventually some error in the given Translator occurred.
        Specified by:
        onTranslateFailed in interface ErrorHandler
        Overrides:
        onTranslateFailed in class AbstractErrorHandler
        Parameters:
        exception - an exception which was thrown
        resource - the resource
        service - service un-proxied instance, can be null if no successful reload was done