Post­Sharp Documentation / API Reference / Post­Sharp.​Aspects Namespace / Method­Execution­Args Class / Method­Execution­Args Properties / Method­Execution­Args.​Exception Property

MethodExecutionArgs.Exception Property

Gets the exception currently flying.

Namespace:  PostSharp.Aspects
Assembly:  PostSharp (in PostSharp.dll) Version: (
public Exception Exception { get; set; }

Property Value

Type: Exception
An Exception, or null if the method is exiting normally.

You cannot replace the exception by setting this property. Throw a new exception from the aspect if you need to replace the current exception.

See Also