Class SpinnakerRetrofitErrorHandler

  • All Implemented Interfaces:
    retrofit.ErrorHandler

    public final class SpinnakerRetrofitErrorHandler
    extends java.lang.Object
    implements retrofit.ErrorHandler
    An error handler to be registered with a RestAdapter. Allows clients to catch more specific NotFoundException, SpinnakerHttpException, or SpinnakerNetworkException depending on the properties of the RetrofitError.
    • Method Detail

      • handleError

        public java.lang.Throwable handleError​(retrofit.RetrofitError e)
        Returns a more specific Throwable depending on properties of the caught RetrofitError.
        Specified by:
        handleError in interface retrofit.ErrorHandler
        Parameters:
        e - The RetrofitError thrown by an invocation of the RestAdapter
        Returns:
        A more informative Throwable