Skip to content

Commit 49d5cd3

Browse files
committed
Catch exception
1 parent 130033c commit 49d5cd3

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Flow.Launcher.Infrastructure/Image/ThumbnailReader.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,15 @@ private static unsafe HBITMAP GetHBitmapForUrlFile(string fileName, int width, i
141141
}
142142
catch
143143
{
144-
hBitmap = GetHBitmap(Path.GetFullPath(fileName), width, height, options);
144+
try
145+
{
146+
hBitmap = GetHBitmap(Path.GetFullPath(fileName), width, height, options);
147+
}
148+
catch (System.Exception ex)
149+
{
150+
// Handle other exceptions
151+
throw new InvalidOperationException("Failed to get thumbnail", ex);
152+
}
145153
}
146154

147155
return hBitmap;

0 commit comments

Comments
 (0)