Package 

Class ImageModuleException

  • All Implemented Interfaces:
    java.io.Serializable

    
    public final class ImageModuleException
    extends Exception
                        

    An exception with zero or more causes indicating why a load in ImageModule failed.

    • Constructor Detail

      • ImageModuleException

        ImageModuleException(String message)
      • ImageModuleException

        ImageModuleException(String detailMessage, Throwable cause)
    • Method Detail

      • getCauses

         List<Throwable> getCauses()

        Returns a list of causes that are immediate children of this exception.

        Causes may or may not be ImageModuleExceptions. Causes may also not be rootcauses, and in turn my have been caused by other failures.

      • setOrigin

         void setOrigin(@Nullable() Exception exception)

        Sets a stack trace that includes where the request originated.

        This is an experimental API that may be removed in the future.

      • getOrigin

        @Nullable() Exception getOrigin()

        Returns an Exception with a stack trace that includes where the request originated (ifpreviously set via setOrigin)

        This is an experimental API that may be removed in the future.

      • getRootCauses

         List<Throwable> getRootCauses()

        Returns the list of root causes that are the leaf nodes of all children of this exception.

        Use this method to do things like look for http exceptions that indicate the load may havefailed due to an error that can be retried. Keep in mind that because ImageModule may attempt to loada given model using multiple different pathways, there may be multiple related or unrelatedreasons for a load to fail.

      • logRootCauses

         void logRootCauses(String tag)

        Logs all root causes using the given tag.

        Each root cause is logged separately to avoid throttling. printStackTrace willprovide a more succinct overview of why the exception occurred, although it does not includecomplete stack traces.