Aspects.Logging.LogAttribute.OnException C# (CSharp) Method

OnException() public method

Method executed after the body of methods to which this aspect is applied, in case that the method resulted with an exception.
args
public OnException ( MethodExecutionArgs args ) : void
args MethodExecutionArgs Event arguments specifying which method /// is being executed and which are its arguments.
return void
        public override void OnException(MethodExecutionArgs args)
        {
            if (args == null) throw new ArgumentNullException("args");

            if (!_shouldLog)
                return;

            args.FlowBehavior = FlowBehavior.RethrowException;

            LoggingInfo info = GetLoggingInfo();

            string message = MessageFormatter.FormatMessage(Output, args, "Exception", info);

            Logger.Error(message, args.Exception);
        }