PostSharp//API Reference/Post­Sharp.​Aspects/On­Method­Boundary­Aspect/On­Exception
Open sandboxFocus

Method OnException

OnException(MethodExecutionArgs)

Method executed after the body of methods to which this aspect is applied, in case that the method resulted with an exception.

Declaration
[MethodExecutionAdviceOptimization]
[RequiresMethodExecutionAdviceAnalysis]
[RequiresDebuggerEnhancement]
[HasInheritedAttribute]
public virtual void OnException(MethodExecutionArgs args)
Parameters
Type Name Description
MethodExecutionArgs args

Event arguments specifying which method is being executed and which are its arguments.

Implements
IOnMethodBoundaryAspect.OnException(MethodExecutionArgs)