From 5e7573b654d135cb92ca92c576d8f54295763374 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Wed, 9 Apr 2025 16:28:53 +0800 Subject: [PATCH] Add log messages --- Flow.Launcher.Infrastructure/Image/ImageLoader.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher.Infrastructure/Image/ImageLoader.cs b/Flow.Launcher.Infrastructure/Image/ImageLoader.cs index ba46a7cff..e0959ccc2 100644 --- a/Flow.Launcher.Infrastructure/Image/ImageLoader.cs +++ b/Flow.Launcher.Infrastructure/Image/ImageLoader.cs @@ -233,10 +233,11 @@ namespace Flow.Launcher.Infrastructure.Image image = LoadFullImage(path); type = ImageType.FullImageFile; } - catch (NotSupportedException) + catch (NotSupportedException ex) { image = Image; type = ImageType.Error; + Log.Exception($"Failed to load image file from path {path}: {ex.Message}", ex); } } else @@ -256,10 +257,11 @@ namespace Flow.Launcher.Infrastructure.Image image = LoadSvgImage(path, loadFullImage); type = ImageType.FullImageFile; } - catch (System.Exception) + catch (System.Exception ex) { image = Image; type = ImageType.Error; + Log.Exception($"Failed to load SVG image from path {path}: {ex.Message}", ex); } } else