Table of Contents

Class HttpError

Namespace
System.Web.Http
Assembly
System.Web.Http.dll

Defines a serializable container for arbitrary error information.

public sealed class HttpError : Dictionary<string, object>, IDictionary<string, object>, ICollection<KeyValuePair<string, object>>, IDictionary, ICollection, IReadOnlyDictionary<string, object>, IReadOnlyCollection<KeyValuePair<string, object>>, IEnumerable<KeyValuePair<string, object>>, IEnumerable, ISerializable, IDeserializationCallback, IXmlSerializable
Inheritance
HttpError
Implements
IXmlSerializable
Inherited Members

Constructors

HttpError()

Initializes a new instance of the HttpError class.

public HttpError()

HttpError(Exception, bool)

Initializes a new instance of the HttpError class for exception.

public HttpError(Exception exception, bool includeErrorDetail)

Parameters

exception Exception

The exception to use for error information.

includeErrorDetail bool

true to include the exception information in the error; false otherwise

HttpError(string)

Initializes a new instance of the HttpError class containing error message message.

public HttpError(string message)

Parameters

message string

The error message to associate with this instance.

HttpError(ModelStateDictionary, bool)

Initializes a new instance of the HttpError class for modelState.

public HttpError(ModelStateDictionary modelState, bool includeErrorDetail)

Parameters

modelState ModelStateDictionary

The invalid model state to use for error information.

includeErrorDetail bool

true to include exception messages in the error; false otherwise

Properties

Message

The error message associated with this instance.

public string Message { get; set; }

Property Value

string