1- using Flow . Launcher . Plugin . BrowserBookmark . Models ;
2- using Microsoft . Data . Sqlite ;
3- using System ;
1+ using System ;
42using System . Collections . Generic ;
53using System . IO ;
64using System . Linq ;
7- using Flow . Launcher . Infrastructure . Logger ;
5+ using Flow . Launcher . Plugin . BrowserBookmark . Models ;
6+ using Microsoft . Data . Sqlite ;
87
98namespace Flow . Launcher . Plugin . BrowserBookmark ;
109
1110public abstract class FirefoxBookmarkLoaderBase : IBookmarkLoader
1211{
12+ private static readonly string ClassName = nameof ( FirefoxBookmarkLoaderBase ) ;
13+
1314 private readonly string _faviconCacheDir ;
1415
1516 protected FirefoxBookmarkLoaderBase ( )
@@ -52,7 +53,7 @@ protected List<Bookmark> GetBookmarksFromPath(string placesPath)
5253 }
5354 catch ( Exception ex )
5455 {
55- Log . Exception ( $ "Failed to register Firefox bookmark file monitoring: { placesPath } ", ex ) ;
56+ Main . _context . API . LogException ( ClassName , $ "Failed to register Firefox bookmark file monitoring: { placesPath } ", ex ) ;
5657 }
5758
5859 // Use a copy to avoid lock issues with the original file
@@ -93,12 +94,12 @@ protected List<Bookmark> GetBookmarksFromPath(string placesPath)
9394 }
9495 catch ( Exception ex )
9596 {
96- Log . Exception ( $ "Failed to delete temporary favicon DB: { tempDbPath } ", ex ) ;
97+ Main . _context . API . LogException ( ClassName , $ "Failed to delete temporary favicon DB: { tempDbPath } ", ex ) ;
9798 }
9899 }
99100 catch ( Exception ex )
100101 {
101- Log . Exception ( $ "Failed to load Firefox bookmarks: { placesPath } ", ex ) ;
102+ Main . _context . API . LogException ( ClassName , $ "Failed to load Firefox bookmarks: { placesPath } ", ex ) ;
102103 }
103104
104105 return bookmarks ;
@@ -177,7 +178,7 @@ ORDER BY i.width DESC -- Select largest icon available
177178 }
178179 catch ( Exception ex )
179180 {
180- Log . Exception ( $ "Failed to extract Firefox favicon: { bookmark . Url } ", ex ) ;
181+ Main . _context . API . LogException ( ClassName , $ "Failed to extract Firefox favicon: { bookmark . Url } ", ex ) ;
181182 }
182183 }
183184
@@ -192,12 +193,12 @@ ORDER BY i.width DESC -- Select largest icon available
192193 }
193194 catch ( Exception ex )
194195 {
195- Log . Exception ( $ "Failed to delete temporary favicon DB: { tempDbPath } ", ex ) ;
196+ Main . _context . API . LogException ( ClassName , $ "Failed to delete temporary favicon DB: { tempDbPath } ", ex ) ;
196197 }
197198 }
198199 catch ( Exception ex )
199200 {
200- Log . Exception ( $ "Failed to load Firefox favicon DB: { faviconDbPath } ", ex ) ;
201+ Main . _context . API . LogException ( ClassName , $ "Failed to load Firefox favicon DB: { faviconDbPath } ", ex ) ;
201202 }
202203 }
203204
@@ -218,7 +219,7 @@ private static void SaveBitmapData(byte[] imageData, string outputPath)
218219 }
219220 catch ( Exception ex )
220221 {
221- Log . Exception ( $ "Failed to save image: { outputPath } ", ex ) ;
222+ Main . _context . API . LogException ( ClassName , $ "Failed to save image: { outputPath } ", ex ) ;
222223 }
223224 }
224225}
0 commit comments