Skip to content

Commit 977a8f8

Browse files
committed
Log exception when deleting failed
1 parent 02d0916 commit 977a8f8

File tree

2 files changed

+24
-3
lines changed

2 files changed

+24
-3
lines changed

Plugins/Flow.Launcher.Plugin.BrowserBookmark/ChromiumBookmarkLoader.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,14 @@ ORDER BY b.width DESC
200200
}
201201

202202
// Delete temporary file
203-
try { File.Delete(tempDbPath); } catch { /* Ignore */ }
203+
try
204+
{
205+
File.Delete(tempDbPath);
206+
}
207+
catch (Exception ex)
208+
{
209+
Log.Exception($"Failed to delete temporary favicon DB: {tempDbPath}", ex);
210+
}
204211
}
205212
catch (Exception ex)
206213
{

Plugins/Flow.Launcher.Plugin.BrowserBookmark/FirefoxBookmarkLoader.cs

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,14 @@ protected List<Bookmark> GetBookmarksFromPath(string placesPath)
8585
}
8686

8787
// Delete temporary file
88-
try { File.Delete(tempDbPath); } catch { /* Ignore */ }
88+
try
89+
{
90+
File.Delete(tempDbPath);
91+
}
92+
catch (Exception ex)
93+
{
94+
Log.Exception($"Failed to delete temporary favicon DB: {tempDbPath}", ex);
95+
}
8996
}
9097
catch (Exception ex)
9198
{
@@ -159,7 +166,14 @@ ORDER BY i.width DESC -- Select largest icon available
159166
}
160167

161168
// Delete temporary file
162-
try { File.Delete(tempDbPath); } catch { /* Ignore */ }
169+
try
170+
{
171+
File.Delete(tempDbPath);
172+
}
173+
catch (Exception ex)
174+
{
175+
Log.Exception($"Failed to delete temporary favicon DB: {tempDbPath}", ex);
176+
}
163177
}
164178
catch (Exception ex)
165179
{

0 commit comments

Comments
 (0)