Constructor ServiceResponseException
ServiceResponseException()
Initializes a new instance of
ServiceResponseException.
Declaration
public ServiceResponseException()
ServiceResponseException(string)
Initializes a new instance of
ServiceResponseException with the message that
describes the current exception.
Declaration
public ServiceResponseException(string message)
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | A message that describes the current exception. |
ServiceResponseException(string, Exception)
Initializes a new instance of
ServiceResponseException with the message that
describes the current exception and an inner exception.
Declaration
public ServiceResponseException(string message, Exception inner)
Parameters
| Type | Name | Description |
|---|---|---|
| string | message | A message that describes the current exception. |
| Exception | inner | The inner exception. |
ServiceResponseException(HttpStatusCode, string, string)
Initializes a new instance of
ServiceResponseException with the HTTP status code,
HTTP status message and HTTP response message.
Declaration
public ServiceResponseException(HttpStatusCode statusCode, string reasonPhrase, string responseMessage)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpStatusCode | statusCode | HTTP status code. |
| string | reasonPhrase | HTTP status message. |
| string | responseMessage | Message in the body of the HTTP response. |
Remarks
The value of Message is generated from
statusCode and reasonPhrase.
The raw HTTP response body is available via
ResponseMessage and may contain sensitive
diagnostic content.