@@ -640,6 +640,8 @@ await checkHelpLinkAsync(helpLinkUri).ConfigureAwait(false))
640
640
{
641
641
await Console . Error . WriteLineAsync ( $ "Missing entry in { fileWithPath } ") . ConfigureAwait ( false ) ;
642
642
await Console . Error . WriteLineAsync ( line ) . ConfigureAwait ( false ) ;
643
+ await Console . Error . WriteLineAsync ( "Actual:" ) . ConfigureAwait ( false ) ;
644
+ await Console . Error . WriteLineAsync ( string . Join ( Environment . NewLine , actualContent ) ) . ConfigureAwait ( false ) ;
643
645
// The file is missing an entry. Mark it as invalid and break the loop as there is no need to continue validating.
644
646
fileNamesWithValidationFailures . Add ( fileWithPath ) ;
645
647
break ;
@@ -664,6 +666,7 @@ async Task<bool> checkHelpLinkAsync(string helpLink)
664
666
{
665
667
if ( ! Uri . TryCreate ( helpLink , UriKind . Absolute , out var uri ) )
666
668
{
669
+ await Console . Error . WriteLineAsync ( $ "Failed to create URI for { helpLink } :") . ConfigureAwait ( false ) ;
667
670
return false ;
668
671
}
669
672
@@ -674,10 +677,15 @@ async Task<bool> checkHelpLinkAsync(string helpLink)
674
677
675
678
var request = new HttpRequestMessage ( HttpMethod . Head , uri ) ;
676
679
using var response = await httpClient . SendAsync ( request ) . ConfigureAwait ( false ) ;
680
+ await Console . Error . WriteLineAsync ( "Response: " + response ) . ConfigureAwait ( false ) ;
681
+ await Console . Error . WriteLineAsync ( "Status code: " + response ? . StatusCode ) . ConfigureAwait ( false ) ;
682
+ await Console . Error . WriteLineAsync ( "content: " + response ? . Content ) . ConfigureAwait ( false ) ;
677
683
return response ? . StatusCode == HttpStatusCode . OK ;
678
684
}
679
- catch ( WebException )
685
+ catch ( WebException ex )
680
686
{
687
+ await Console . Error . WriteLineAsync ( $ "Exception checking { helpLink } :") . ConfigureAwait ( false ) ;
688
+ await Console . Error . WriteLineAsync ( ex . ToString ( ) ) . ConfigureAwait ( false ) ;
681
689
return false ;
682
690
}
683
691
}
@@ -1185,6 +1193,10 @@ private static void Validate(string fileWithPath, string fileContents, List<stri
1185
1193
string actual = File . ReadAllText ( fileWithPath ) ;
1186
1194
if ( actual != fileContents )
1187
1195
{
1196
+ Console . Error . WriteLine ( $ "{ fileWithPath } is different. We built:") ;
1197
+ Console . Error . WriteLine ( fileContents ) ;
1198
+ Console . Error . WriteLine ( $ "But actually had:") ;
1199
+ Console . Error . WriteLine ( actual ) ;
1188
1200
fileNamesWithValidationFailures . Add ( fileWithPath ) ;
1189
1201
}
1190
1202
}
0 commit comments