Exemplo n.º 1
0
        public static string BuildReport(Exception exception)
        {
            StringBuilder exceptionText = new StringBuilder();

            exceptionText.AppendLine(EnvironmentInfo.EnvironmentToString(true));
            exceptionText.AppendLine(EnvironmentInfo.ExceptionToString(exception));
            exceptionText.AppendLine("Configuration dump:");
            using (TextWriter writer = new StringWriter(exceptionText)) {
                IniConfig.SaveIniSectionToWriter(writer, IniConfig.GetIniSection <CoreConfiguration>(), true);
            }

            return(exceptionText.ToString());
        }