Skip to content

Commit ba37907

Browse files
Potential fix for code scanning alert no. 83: Poor error handling: empty catch block (#32)
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent cdf2566 commit ba37907

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/MainWindow.xaml.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,9 @@ private void Log(string message)
7676
{
7777
_logManager?.WriteLog(message);
7878
}
79-
catch (ObjectDisposedException)
79+
catch (ObjectDisposedException ex)
8080
{
81+
Debug.WriteLine($"LogManager disposed while writing log entry: {ex.Message}");
8182
}
8283

8384
UpdateLogStatistics();

0 commit comments

Comments
 (0)