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++;