IExceptionFilter.OnException Method

Called when an exception occurs.

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

'Declaration
Sub OnException ( _
	filterContext As ExceptionContext _
)
'Usage
Dim instance As IExceptionFilter 
Dim filterContext As ExceptionContext

instance.OnException(filterContext)

Parameters

filterContext
Type: System.Web.Mvc.ExceptionContext

The filter context.

NoteNote

In ASP.NET MVC versions 1 and 2, the OnException(ExceptionContext) 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.

Show: