No no. But you can write an extension method for the Exception class that does this so you can call
someException.Trace();
The ToString method of the Exception class probably returns everything you want to just track this. You can add additional information (repeat internal exceptions if the stack trace is insufficient) process ID, user ID, thread ID, etc. In the same way.
public static class ExceptionExtensions { public static void Trace(this Exception _this) { Trace.TraceError("{0:HH:mm:ss.fff} Exception {1}", DateTime.Now, _this); } }
source share