Show / Hide Table of Contents

Class WebApiException

Defines an abstract base class for the Web API exceptions.

Inheritance
System.Object
System.Exception
WebApiException
ClientErrorException
ServerErrorException
Implements
System.Runtime.Serialization.ISerializable
Inherited Members
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 WebApiException : Exception, ISerializable

Constructors

| Improve this Doc View Source

WebApiException(WebApiErrorResponse, String)

Initializes a new instance.

Declaration
protected WebApiException(WebApiErrorResponse webApiErrorResponse, string message)
Parameters
Type Name Description
WebApiErrorResponse webApiErrorResponse

Specifies a Web API error response.

System.String message

Specifies an error message.

| Improve this Doc View Source

WebApiException(HttpStatusCode, String, Exception)

Initializes a new instance.

Declaration
protected WebApiException(HttpStatusCode statusCode, string message, Exception innerException)
Parameters
Type Name Description
System.Net.HttpStatusCode statusCode

Specifies an HTTP status code.

System.String message

Specifies an error message.

System.Exception innerException

Specifies an inner exception.

Properties

| Improve this Doc View Source

ServiceStack

Gets the service stack related to this WebApiException instance.

Declaration
public string[] ServiceStack { get; }
Property Value
Type Description
System.String[]
| Improve this Doc View Source

StatusCode

Gets the HTTP status code related to this WebApiException instance.

Declaration
public HttpStatusCode StatusCode { get; }
Property Value
Type Description
System.Net.HttpStatusCode

Methods

| Improve this Doc View Source

SetServiceName(String)

Sets the name of the service that the process represents.

Declaration
public static void SetServiceName(string serviceName)
Parameters
Type Name Description
System.String serviceName

Specifies a service name.

Remarks

The service name appears in the values of the ServiceStack property of the instances of this class. The default value for the service name is the file name (without extension) of the entry assembly.

| Improve this Doc View Source

ToString()

Converts this WebApiException instance to a string.

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

Returns this WebApiExceptioninstance as a string.

Overrides
System.Exception.ToString()

Implements

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