Show / Hide Table of Contents

Class ClientErrorException

Defines an abstract base class for the client error Web API exceptions.

Inheritance
System.Object
System.Exception
WebApiException
ClientErrorException
BadRequestException
ConflictException
ExpectationFailedException
ForbiddenException
GoneException
LengthRequiredException
MethodNotAllowedException
NotAcceptableException
NotFoundException
PaymentRequiredException
PreconditionFailedException
ProxyAuthenticationRequiredException
RequestedRangeNotSatisfiableException
RequestEntityTooLargeException
RequestTimeoutException
RequestUriTooLongException
UnauthorizedException
UnsupportedMediaTypeException
UpgradeRequiredException
Implements
System.Runtime.Serialization.ISerializable
Inherited Members
WebApiException.SetServiceName(String)
WebApiException.ServiceStack
WebApiException.StatusCode
System.Exception.GetBaseException()
System.Exception.GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)
System.Exception.GetType()
System.Exception.Data
System.Exception.HelpLink
System.Exception.HResult
System.Exception.InnerException
System.Exception.Message
System.Exception.Source
System.Exception.StackTrace
System.Exception.TargetSite
System.Exception.SerializeObjectState
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Juhta.Net.WebApi.Exceptions
Assembly: Juhta.Net.WebApi.Exceptions.dll
Syntax
public abstract class ClientErrorException : WebApiException, ISerializable

Constructors

| Improve this Doc View Source

ClientErrorException(ClientErrorResponse)

Initializes a new instance.

Declaration
protected ClientErrorException(ClientErrorResponse clientErrorResponse)
Parameters
Type Name Description
ClientErrorResponse clientErrorResponse

Specifies a client error response.

| Improve this Doc View Source

ClientErrorException(HttpStatusCode)

Initializes a new instance.

Declaration
protected ClientErrorException(HttpStatusCode statusCode)
Parameters
Type Name Description
System.Net.HttpStatusCode statusCode

Specifies an HTTP status code.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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 Source

Error

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
| Improve this Doc View Source

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 Source

ToClientErrorResponse()

Converts this ClientErrorException object to a ClientErrorResponse object.

Declaration
public ClientErrorResponse ToClientErrorResponse()
Returns
Type Description
ClientErrorResponse

Returns the resulting ClientErrorResponse object.

| Improve this Doc View Source

ToString()

Converts this ClientErrorException instance to a string.

Declaration
public override string ToString()
Returns
Type Description
System.String

Returns this ClientErrorExceptioninstance as a string.

Overrides
WebApiException.ToString()

Implements

System.Runtime.Serialization.ISerializable
  • Improve this Doc
  • View Source
Back to top Copyright © 2017-2019 Juha Lähteenmäki
Generated by DocFX