Class ClientErrorException
Defines an abstract base class for the client error Web API exceptions.
Inheritance
Implements
Inherited Members
Namespace: Juhta.Net.WebApi.Exceptions
Assembly: Juhta.Net.WebApi.Exceptions.dll
Syntax
public abstract class ClientErrorException : WebApiException, ISerializableConstructors
| Improve this Doc View SourceClientErrorException(ClientErrorResponse)
Initializes a new instance.
Declaration
protected ClientErrorException(ClientErrorResponse clientErrorResponse)Parameters
| Type | Name | Description | 
|---|---|---|
| ClientErrorResponse | clientErrorResponse | Specifies a client error response. | 
ClientErrorException(HttpStatusCode)
Initializes a new instance.
Declaration
protected ClientErrorException(HttpStatusCode statusCode)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Net.HttpStatusCode | statusCode | Specifies an HTTP status code. | 
ClientErrorException(HttpStatusCode, ClientError)
Initializes a new instance.
Declaration
protected ClientErrorException(HttpStatusCode statusCode, ClientError clientError)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Net.HttpStatusCode | statusCode | Specifies an HTTP status code. | 
| ClientError | clientError | Specifies a client error. | 
ClientErrorException(HttpStatusCode, IEnumerable<ClientError>)
Initializes a new instance.
Declaration
protected ClientErrorException(HttpStatusCode statusCode, IEnumerable<ClientError> clientErrors)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Net.HttpStatusCode | statusCode | Specifies an HTTP status code. | 
| System.Collections.Generic.IEnumerable<ClientError> | clientErrors | Specifies a collection of client errors. | 
ClientErrorException(HttpStatusCode, String)
Initializes a new instance.
Declaration
protected ClientErrorException(HttpStatusCode statusCode, string errorMessage)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Net.HttpStatusCode | statusCode | Specifies an HTTP status code. | 
| System.String | errorMessage | Specifies an error message. | 
ClientErrorException(HttpStatusCode, String, String)
Initializes a new instance.
Declaration
protected ClientErrorException(HttpStatusCode statusCode, string errorMessage, string errorCode)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Net.HttpStatusCode | statusCode | Specifies an HTTP status code. | 
| System.String | errorMessage | Specifies an error message. | 
| System.String | errorCode | Specifies a custom-defined error code. | 
ClientErrorException(HttpStatusCode, String, String, String)
Initializes a new instance.
Declaration
protected ClientErrorException(HttpStatusCode statusCode, string errorMessage, string errorCode, string field)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Net.HttpStatusCode | statusCode | Specifies an HTTP status code. | 
| System.String | errorMessage | Specifies an error message. | 
| System.String | errorCode | Specifies a custom-defined error code. | 
| System.String | field | Specifies a field in the incoming request to which the error relates. | 
ClientErrorException(HttpStatusCode, String, String, String, String)
Initializes a new instance.
Declaration
protected ClientErrorException(HttpStatusCode statusCode, string errorMessage, string errorCode, string field, string helpUrl)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Net.HttpStatusCode | statusCode | Specifies an HTTP status code. | 
| System.String | errorMessage | Specifies an error message. | 
| System.String | errorCode | Specifies a custom-defined error code. | 
| System.String | field | Specifies a field in the incoming request to which the error relates. | 
| System.String | helpUrl | Specifies a URL that provides extra information about the error. | 
Properties
| Improve this Doc View SourceError
Gets the first ClientError object that relates to this ClientErrorException instance. Returns null if there are no ClientError objects.
Declaration
public ClientError Error { get; }Property Value
| Type | Description | 
|---|---|
| ClientError | 
Errors
Gets an array of the ClientError objects that relate to this ClientErrorException instance. Returns null if there are no ClientError objects.
Declaration
public ClientError[] Errors { get; }Property Value
| Type | Description | 
|---|---|
| ClientError[] | 
Methods
| Improve this Doc View SourceToClientErrorResponse()
Converts this ClientErrorException object to a ClientErrorResponse object.
Declaration
public ClientErrorResponse ToClientErrorResponse()Returns
| Type | Description | 
|---|---|
| ClientErrorResponse | Returns the resulting ClientErrorResponse object. | 
ToString()
Converts this ClientErrorException instance to a string.
Declaration
public override string ToString()Returns
| Type | Description | 
|---|---|
| System.String | Returns this ClientErrorExceptioninstance as a string. |