Check-in [87b1f645a6]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Check for errors in Uglify output.
Timelines: family | ancestors | descendants | both | dotnet
Files: files | file ages | folders
SHA1: 87b1f645a67dc5332f323d4dfda60c0fad85a14a
User & Date: tinus 2019-09-13 20:46:02
Wiki:dotnet
Context
2019-09-14
05:53
Better reporting of Uglify errors. check-in: 6cdbea3412 user: tinus tags: dotnet
2019-09-13
20:46
Check for errors in Uglify output. check-in: 87b1f645a6 user: tinus tags: dotnet
18:56
More logical population of message-related things. check-in: 94dd79783d user: tinus tags: dotnet
Changes

Changes to MailSynchronizer.cs.

518
519
520
521
522
523
524
525









526
527
528
529
530
531
532
                else
                    bodyText = "";
                var errors = new List<Exception>();
                try
                {
                    try
                    {
                        bodyText += NUglify.Uglify.HtmlToText(sourceMsg.HtmlBody, NUglify.Html.HtmlToTextOptions.KeepStructure).Code.Trim();









                        return bodyText;
                    }
                    catch (Exception ex)
                    {
                        errors.Add(ex);
                    }
                    try







|
>
>
>
>
>
>
>
>
>







518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
                else
                    bodyText = "";
                var errors = new List<Exception>();
                try
                {
                    try
                    {
                        var result = NUglify.Uglify.HtmlToText(sourceMsg.HtmlBody, NUglify.Html.HtmlToTextOptions.KeepStructure);
                        if (result.Code == null && result.HasErrors)
                        {
                            throw new AggregateException(result.Errors.Select(e => new Exception($"Error {e.ErrorCode} at line {e.StartLine}, column {e.StartColumn}: {e.Message}")
                            {
                                Source = nameof(NUglify.Uglify),
                                //HResult = e.ErrorNumber,
                            }));
                        }
                        bodyText += result.Code.Trim();
                        return bodyText;
                    }
                    catch (Exception ex)
                    {
                        errors.Add(ex);
                    }
                    try