Class APIException

  • All Implemented Interfaces:
    java.io.Serializable

    public class APIException
    extends java.io.IOException
    APIException indicates a problem communicating with Algorithmia
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      APIException​(java.lang.String message)
      Constructs a new API exception with the specified detail message, no stack trace.
      APIException​(java.lang.String message, java.lang.Throwable cause)
      Constructs a new API exception with the specified detail message and cause.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static APIException fromHttpResponse​(org.apache.http.HttpResponse response)  
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

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

      • APIException

        public APIException​(java.lang.String message)
        Constructs a new API exception with the specified detail message, no stack trace.
        Parameters:
        message - the detail message
      • APIException

        public APIException​(java.lang.String message,
                            java.lang.Throwable cause)
        Constructs a new API exception with the specified detail message and cause.
        Parameters:
        message - the detail message
        cause - the cause of the AlgorithmException
    • Method Detail

      • fromHttpResponse

        public static APIException fromHttpResponse​(org.apache.http.HttpResponse response)