HttpError Class

Definition

Defines a serializable container for storing error information. This information is stored as key/value pairs. The dictionary keys to look up standard error information are available on the HttpErrorKeys type.

public sealed class HttpError : System.Collections.Generic.Dictionary<string,object>, System.Xml.Serialization.IXmlSerializable
type HttpError = class
    inherit Dictionary<string, obj>
    interface IXmlSerializable
Public NotInheritable Class HttpError
Inherits Dictionary(Of String, Object)
Implements IXmlSerializable
Inheritance
HttpError
Implements

Constructors

HttpError()

Initializes a new instance of the HttpError class.

HttpError(Exception, Boolean)

Initializes a new instance of the HttpError class for exception.

HttpError(ModelStateDictionary, Boolean)

Initializes a new instance of the HttpError class for modelState.

HttpError(String)

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

Properties

ExceptionMessage

The message of the Exception if available.

ExceptionType

The type of the Exception if available.

InnerException

The inner Exception associated with this instance if available.

Message

The high-level, user-visible message explaining the cause of the error. Information carried in this field should be considered public in that it will go over the wire regardless of the value of error detail policy. As a result care should be taken not to disclose sensitive information about the server or the application.

MessageDetail

A detailed description of the error intended for the developer to understand exactly what failed.

ModelState

The ModelState containing information about the errors that occurred during model binding.

StackTrace

The stack trace information associated with this instance if available.

Methods

GetPropertyValue<TValue>(String)

Gets a particular property value from this error instance.

Explicit Interface Implementations

IXmlSerializable.GetSchema()

This method is reserved and should not be used.

IXmlSerializable.ReadXml(XmlReader)

Generates an HttpError instance from its XML representation.

IXmlSerializable.WriteXml(XmlWriter)

Converts an HttpError instance into its XML representation.

Applies to