Пример #1
0
        /// <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());
            }
        }
Пример #2
0
 public static string GetHiearchicalExceptionInfo(Exception error, ref Exception innerMostException)
 {
     UpdateEmailSubject(error);
     return(ExceptionHelper.GetHiearchicalExceptionInfo(error, ref innerMostException));
 }