ErrorContractException Class

public final class ErrorContractException
extends HttpResponseException

Exception thrown for an invalid response with ErrorContract information.

Constructor Summary

Constructor Description
ErrorContractException(String message, HttpResponse response)

Initializes a new instance of the ErrorContractException class.

ErrorContractException(String message, HttpResponse response, ErrorContract value)

Initializes a new instance of the ErrorContractException class.

Method Summary

Modifier and Type Method and Description
ErrorContract getValue()

Methods inherited from HttpResponseException

Methods inherited from java.lang.Object

Methods inherited from java.lang.Throwable

Constructor Details

ErrorContractException

public ErrorContractException(String message, HttpResponse response)

Initializes a new instance of the ErrorContractException class.

Parameters:

message - the exception message or the response content if a message is not available.
response - the HTTP response.

ErrorContractException

public ErrorContractException(String message, HttpResponse response, ErrorContract value)

Initializes a new instance of the ErrorContractException class.

Parameters:

message - the exception message or the response content if a message is not available.
response - the HTTP response.
value - the deserialized response value.

Method Details

getValue

public ErrorContract getValue()

Overrides:

ErrorContractException.getValue()

Applies to