Open sandboxFocus

Method GetExceptionType

GetExceptionType(MethodBase)

Gets the type of exception handled by this aspect.

Declaration
public virtual Type GetExceptionType(MethodBase targetMethod)
Parameters
Type Name Description
MethodBase targetMethod

Method to which the current aspect is applied.

Returns
Type Description
Type

The type (derived from Exception) of exceptions handled by this aspect.

Remarks

This method is invoked at build time for each target method. The default implementation returns null, which means that the aspect handles exceptions of any type. To handle several types of exceptions, return their common base type and test the type of Exception in OnException(MethodExecutionArgs).

See Also