Skip to content

Commit faa49e6

Browse files
committed
Add diagnostic logging to GetFileStreamException catch block
The GetFileStreamException catch in GetFileStreamHandlerAsyncHandler silently completed the ProjFS command without logging requestMetadata (SHA, virtual path). Other catch blocks in the same handler all log this metadata. Add a RelatedWarning with the HResult value for diagnostic visibility while keeping the severity appropriate for expected/benign HResult.Handle results. Assisted-by: Claude Opus 4.6 Signed-off-by: Tyrie Vella <tyrielv@gmail.com>
1 parent b65af3a commit faa49e6

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

GVFS/GVFS.Platform.Windows/WindowsFileSystemVirtualizer.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -981,6 +981,9 @@ private void GetFileStreamHandlerAsyncHandler(
981981
}
982982
catch (GetFileStreamException e)
983983
{
984+
requestMetadata.Add(TracingConstants.MessageKey.InfoMessage, $"{nameof(this.GetFileStreamHandlerAsyncHandler)}: GetFileStreamException HResult 0x{e.HResult:X8}");
985+
this.Context.Tracer.RelatedWarning(requestMetadata, nameof(this.GetFileStreamHandlerAsyncHandler) + "_GetFileStreamException");
986+
984987
this.TryCompleteCommand(commandId, (HResult)e.HResult);
985988
return;
986989
}

0 commit comments

Comments
 (0)