Table of Contents

Class ExceptionContext

Namespace
System.Web.Mvc
Assembly
System.Web.Mvc.dll

Provides the context for using the HandleErrorAttribute class.

public class ExceptionContext : ControllerContext
Inheritance
ExceptionContext
Inherited Members

Constructors

ExceptionContext()

Initializes a new instance of the ExceptionContext class.

public ExceptionContext()

ExceptionContext(ControllerContext, Exception)

Initializes a new instance of the ExceptionContext class for the specified exception by using the specified controller context.

public ExceptionContext(ControllerContext controllerContext, Exception exception)

Parameters

controllerContext ControllerContext

The controller context.

exception Exception

The exception.

Exceptions

ArgumentNullException

The exception parameter is null.

Properties

Exception

Gets or sets the exception object.

public virtual Exception Exception { get; set; }

Property Value

Exception

The exception object.

ExceptionHandled

Gets or sets a value that indicates whether the exception has been handled.

public bool ExceptionHandled { get; set; }

Property Value

bool

true if the exception has been handled; otherwise, false.

Result

Gets or sets the action result.

public ActionResult Result { get; set; }

Property Value

ActionResult

The action result.