/// <summary> /// Writes <paramref name="msg"/> and an exception and its stack trace to the log. /// This method will do nothing if Init() is not called first. /// </summary> public static void WriteError(string msg, Exception e) { Exception dummy = null; var bldr = new StringBuilder(msg); if (bldr.Length > 0) { bldr.AppendLine(); } bldr.Append(ExceptionHelper.GetHiearchicalExceptionInfo(e, ref dummy)); Debug.WriteLine(bldr.ToString()); if (Singleton != null) { Singleton.WriteEventCore(bldr.ToString()); } }
public static string GetHiearchicalExceptionInfo(Exception error, ref Exception innerMostException) { UpdateEmailSubject(error); return(ExceptionHelper.GetHiearchicalExceptionInfo(error, ref innerMostException)); }