Table of Contents

Class HandleErrorInfo

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

Encapsulates information for handling an error that was thrown by an action method.

public class HandleErrorInfo
Inheritance
HandleErrorInfo
Inherited Members

Constructors

HandleErrorInfo(Exception, string, string)

Initializes a new instance of the HandleErrorInfo class.

public HandleErrorInfo(Exception exception, string controllerName, string actionName)

Parameters

exception Exception

The exception.

controllerName string

The name of the controller.

actionName string

The name of the action.

Exceptions

ArgumentNullException

The exception parameter is null.

ArgumentException

The controllerName or actionName parameter is null or empty.

Properties

ActionName

Gets or sets the name of the action that was executing when the exception was thrown.

public string ActionName { get; }

Property Value

string

The name of the action.

ControllerName

Gets or sets the name of the controller that contains the action method that threw the exception.

public string ControllerName { get; }

Property Value

string

The name of the controller.

Exception

Gets or sets the exception object.

public Exception Exception { get; }

Property Value

Exception

The exception object.