Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 48dace0

Browse files
author
Jasmine
committed
wrap this in a try
whitespace fix wrap try around file operation only remove excess bracket whitespace fixes
1 parent 8766df6 commit 48dace0

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/GitHub.Exports/Services/Logger.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,15 @@ static async void DefaultLogger(string msg)
7575
// this codepath is called multiple times on loading
7676
// doing a little delay so that calling code doesn't get slowed down by this
7777
await System.Threading.Tasks.Task.Delay(500);
78-
lock(fileLock)
78+
lock (fileLock)
7979
{
80-
File.AppendAllText(defaultLogPath, msg, Encoding.UTF8);
80+
try
81+
{
82+
File.AppendAllText(defaultLogPath, msg, Encoding.UTF8);
83+
}
84+
catch (Exception)
85+
{
86+
}
8187
}
8288
}
8389
}

0 commit comments

Comments
 (0)