예제 #1
0
        /// <summary>
        /// Writes the error to the debug console.
        /// </summary>
        /// <param name="context">The error context.</param>
        /// <returns>Null to continue or an instance that implement <see cref="IMethodReturn" />.</returns>
        public override IMethodReturn OnError(FilterErrorContext context)
        {
            Debug.WriteLine("Error: {0}.{1}", context.MethodInvocation.Target.GetType().FullName, context.MethodInvocation.MethodBase.Name);
            Debug.WriteLine("  Exception: {0}", (object)context.MethodReturn.Exception.StackTrace);

            return(null);
        }
예제 #2
0
 /// <summary>
 /// When overridden in a derived class, handles when an error occurred during the execution.
 /// </summary>
 /// <param name="context">The error context.</param>
 /// <returns>
 /// Null to continue or an instance that implement <see cref="IMethodReturn"/>.
 /// </returns>
 public virtual IMethodReturn OnError(FilterErrorContext context)
 {
     return(null);
 }