Ejemplo n.º 1
0
        static void AddStackTrace(StringBuilder sb, Exception ex)
        {
            if (ex is ReflectionTypeLoadException rtle)
            {
                AddReflectionTypeLoadExceptionDetails(rtle, sb);
            }

            sb.AppendLine(ex.GetType().FullName);
            try
            {
                sb.AppendLine(StackTraceHelper.GetCleanStackTrace(ex));
            }
            catch // Sometimes fails printing the trace
            {
                sb.AppendLine(ex.StackTrace);
            }
        }