Пример #1
0
 internal static string ToLogText(this Exception ex)
 {
     return(Extensions.DumpException(ex));
 }
Пример #2
0
        internal static string DumpException(Exception ex)
        {
            string str;
            string empty = string.Empty;

            if (ex != null)
            {
                object[] message = new object[] { ex.Message, Environment.NewLine, ex.StackTrace, Extensions.DumpException(ex.InnerException) };
                empty = string.Format("{0}{1}{2}{1}{3}", message);
                str   = empty;
            }
            else
            {
                str = empty;
            }
            return(str);
        }