From a556a4b735678d74663cfc1ec90e364d44a3fa8b Mon Sep 17 00:00:00 2001 From: Tobias Wohlleben Date: Wed, 22 Jan 2025 15:49:26 +0100 Subject: [PATCH] wip --- .../Features/PictureGallery/PictureGalleryService.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/CamBooth/CamBooth.App/Features/PictureGallery/PictureGalleryService.cs b/src/CamBooth/CamBooth.App/Features/PictureGallery/PictureGalleryService.cs index c810f4d..f3ed87c 100644 --- a/src/CamBooth/CamBooth.App/Features/PictureGallery/PictureGalleryService.cs +++ b/src/CamBooth/CamBooth.App/Features/PictureGallery/PictureGalleryService.cs @@ -51,8 +51,15 @@ public class PictureGalleryService // add if not exists if (!this.thumbnails.ContainsKey(creationTime)) { - this.thumbnails.Add(creationTime, PictureGalleryService.CreateThumbnail(picturePath, 244, 0)); - this._logger.Info($"Thumbnail '{picturePath}' successfully created"); + try + { + this.thumbnails.Add(creationTime, PictureGalleryService.CreateThumbnail(picturePath, 244, 0)); + this._logger.Info($"Thumbnail '{picturePath}' successfully created"); + } + catch (Exception e) + { + this._logger.Error("thumbnail could not created: " + picturePath + " | " + e.Message); + } } loop++;