Class HttpErrorResponseException

  • All Implemented Interfaces:
    java.io.Serializable

    public class HttpErrorResponseException
    extends java.io.IOException
    An exception thrown for any response code except 200.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      HttpErrorResponseException​(java.net.URL source, int errorCode, java.lang.String message)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int errorCode()
      The error code returned by the server.
      java.lang.String getMessage()  
      java.net.URL source()
      The URL that a connection was made to.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, 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

      • HttpErrorResponseException

        public HttpErrorResponseException​(java.net.URL source,
                                          int errorCode,
                                          java.lang.String message)
    • Method Detail

      • source

        public java.net.URL source()
        The URL that a connection was made to.
        Returns:
        the source url
      • errorCode

        public int errorCode()
        The error code returned by the server.
        Returns:
        the error code
      • getMessage

        public java.lang.String getMessage()
        Overrides:
        getMessage in class java.lang.Throwable