Class DoipException

java.lang.Object
java.lang.Throwable
java.lang.Exception
net.dona.doip.client.DoipException
All Implemented Interfaces:
Serializable

public class DoipException extends Exception
An exception thrown by DoipClient when something goes wrong such as an unexpected status code returned for an operation.
See Also:
  • Constructor Details

    • DoipException

      public DoipException(String message)
    • DoipException

      public DoipException(com.google.gson.JsonElement response)
    • DoipException

      public DoipException(String statusCode, String message)
    • DoipException

      public DoipException(String statusCode, com.google.gson.JsonElement response)
    • DoipException

      public DoipException(Throwable cause)
    • DoipException

      public DoipException(String statusCode, String message, Throwable cause)
    • DoipException

      public DoipException(String statusCode, com.google.gson.JsonElement response, Throwable cause)
  • Method Details

    • getStatusCode

      public String getStatusCode()
      Gets the status code returned by the operation, if available.
      Returns:
      the status code returned by the operation, if available
    • getResponse

      public com.google.gson.JsonElement getResponse()
    • messageForResponse

      public static String messageForResponse(com.google.gson.JsonElement response)
    • responseForMessage

      public static com.google.gson.JsonElement responseForMessage(String message)