From 7818ae000460b06034c4fdf5b8aab971ae0eead4 Mon Sep 17 00:00:00 2001 From: Anton Firszov Date: Sat, 13 Nov 2021 15:51:08 +0100 Subject: [PATCH] temporarily remove try-catch in ImageProcessor.Apply() --- .../Processors/ImageProcessor{TPixel}.cs | 24 +++++-------------- 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/src/ImageSharp/Processing/Processors/ImageProcessor{TPixel}.cs b/src/ImageSharp/Processing/Processors/ImageProcessor{TPixel}.cs index b0896636ea..e290e7089c 100644 --- a/src/ImageSharp/Processing/Processors/ImageProcessor{TPixel}.cs +++ b/src/ImageSharp/Processing/Processors/ImageProcessor{TPixel}.cs @@ -45,27 +45,15 @@ namespace SixLabors.ImageSharp.Processing.Processors /// void IImageProcessor.Execute() { - try - { - this.BeforeImageApply(); + // TODO: Try-catch logic temporarily removed, put it back. + this.BeforeImageApply(); - foreach (ImageFrame sourceFrame in this.Source.Frames) - { - this.Apply(sourceFrame); - } - - this.AfterImageApply(); - } -#if DEBUG - catch (Exception) + foreach (ImageFrame sourceFrame in this.Source.Frames) { - throw; -#else - catch (Exception ex) - { - throw new ImageProcessingException($"An error occurred when processing the image using {this.GetType().Name}. See the inner exception for more detail.", ex); -#endif + this.Apply(sourceFrame); } + + this.AfterImageApply(); } ///