Skip to content

Commit d062828

Browse files
committed
Don't log an error for cancellation
1 parent 01a74ce commit d062828

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Razor/src/Microsoft.CodeAnalysis.Razor.CohostingShared/HtmlDocumentServices/HtmlDocumentSynchronizer.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,11 @@ private async Task<SynchronizationResult> PublishHtmlDocumentAsync(TextDocument
174174

175175
return result;
176176
}
177+
catch (OperationCanceledException)
178+
{
179+
_logger.LogDebug($"Not publishing Html text for {document.FilePath} as the request was cancelled.");
180+
return default;
181+
}
177182
catch (Exception ex)
178183
{
179184
_logger.LogError(ex, $"Error publishing Html text for {document.FilePath}. Html document contents will be stale");

0 commit comments

Comments
 (0)