Share via


IExceptionFilter.OnException Method (ExceptionContext)

 

Called when an exception occurs.

Namespace:   System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

Syntax

void OnException(
    ExceptionContext filterContext
)
void OnException(
    ExceptionContext^ filterContext
)
abstract OnException : 
        filterContext:ExceptionContext -> unit
Sub OnException (
    filterContext As ExceptionContext
)

Parameters

Remarks

Note

In ASP.NET MVC versions 1 and 2, the OnException filters ran in forward order. In ASP.NET MVC version 3 and higher, the order is reversed. Exception filters in ASP.NET MVC have a similar behavior to exception handlers in the .NET Framework, which unwind from the inside out.

See Also

IExceptionFilter Interface
System.Web.Mvc Namespace

Return to top