Class ProtocolException

java.lang.Object
java.lang.Throwable
java.lang.Exception
org.dmfs.httpessentials.exceptions.ProtocolException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
UnexpectedStatusException

public class ProtocolException extends Exception
An Exception that's thrown when an unrecoverable protocol error at application level occurred while handling a response.

An example of a ProtocolException is if the XML in the response of an XML-based protocol is not well-formed or the server returned a status code that's not allowed for this kind of request.

This is different from an ProtocolError which is thrown if the server returned an error that's valid with respect to the application protocol.
See Also:
  • Constructor Details

    • ProtocolException

      public ProtocolException(String message)
      Create a new ProtocolException with a message.
      Parameters:
      message - An error message.
    • ProtocolException

      public ProtocolException(String message, Throwable cause)
      Create a new ProtocolException with a message and a cause.
      Parameters:
      message - An error message.
      cause - The reason for this error.