Skip to content

Commit 9ab32d1

Browse files
CopilotMalcolmnixon
andcommitted
Improve exception handling documentation in Context.cs
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
1 parent 0dd1b48 commit 9ab32d1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/DemaConsulting.BuildMark/Context.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,9 @@ private void OpenLogFile(string logFile)
129129
{
130130
_logWriter = new StreamWriter(logFile, append: false);
131131
}
132-
// Generic catch is justified here to wrap any file system exception with context
132+
// Generic catch is justified here to wrap any file system exception with context.
133+
// Expected exceptions include IOException, UnauthorizedAccessException, ArgumentException,
134+
// NotSupportedException, and other file system-related exceptions.
133135
catch (Exception ex)
134136
{
135137
throw new InvalidOperationException($"Failed to open log file '{logFile}': {ex.Message}", ex);

0 commit comments

Comments
 (0)