From 9ec8dc708173f14a28d4b76d5bb5c29cb82a38b3 Mon Sep 17 00:00:00 2001 From: Anton Firszov Date: Fri, 26 Nov 2021 20:18:35 +0100 Subject: [PATCH] remove processor exception wrapping forever, fixes #1827 --- .../Processors/ImageProcessor{TPixel}.cs | 20 +++---------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/src/ImageSharp/Processing/Processors/ImageProcessor{TPixel}.cs b/src/ImageSharp/Processing/Processors/ImageProcessor{TPixel}.cs index e290e7089c..b0c81dbd7a 100644 --- a/src/ImageSharp/Processing/Processors/ImageProcessor{TPixel}.cs +++ b/src/ImageSharp/Processing/Processors/ImageProcessor{TPixel}.cs @@ -45,7 +45,6 @@ protected ImageProcessor(Configuration configuration, Image source, Rect /// void IImageProcessor.Execute() { - // TODO: Try-catch logic temporarily removed, put it back. this.BeforeImageApply(); foreach (ImageFrame sourceFrame in this.Source.Frames) @@ -62,22 +61,9 @@ void IImageProcessor.Execute() /// the source image. public void Apply(ImageFrame source) { - try - { - this.BeforeFrameApply(source); - this.OnFrameApply(source); - this.AfterFrameApply(source); - } -#if DEBUG - catch (Exception) - { - 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.BeforeFrameApply(source); + this.OnFrameApply(source); + this.AfterFrameApply(source); } ///