private InternalTraceCall ( int levels ) : void | ||
levels | int | |
return | void |
private static void InternalTraceCall(int levels)
{
System.Diagnostics.StackFrame stack;
stack = new System.Diagnostics.StackFrame(levels);
System.Reflection.MethodBase method = stack.GetMethod();
if(method != null)
{
string name = method.Name + " \tin class " + method.DeclaringType.Name;
System.Diagnostics.Trace.WriteLine("Call Trace: \t" + name);
}
}
public static void Trace(System.Exception exception) { if (exception == null) { throw new ArgumentNullException("exception"); } CciTracing.InternalTraceCall(2); System.Diagnostics.Trace.WriteLine("ExceptionInfo: \t" + exception.ToString()); }