Skip to content

Commit

Permalink
remove processor exception wrapping forever, fixes #1827
Browse files Browse the repository at this point in the history
  • Loading branch information
antonfirsov committed Nov 26, 2021
1 parent 7ec7447 commit 9ec8dc7
Showing 1 changed file with 3 additions and 17 deletions.
20 changes: 3 additions & 17 deletions src/ImageSharp/Processing/Processors/ImageProcessor{TPixel}.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ protected ImageProcessor(Configuration configuration, Image<TPixel> source, Rect
/// <inheritdoc/>
void IImageProcessor<TPixel>.Execute()
{
// TODO: Try-catch logic temporarily removed, put it back.
this.BeforeImageApply();

foreach (ImageFrame<TPixel> sourceFrame in this.Source.Frames)
Expand All @@ -62,22 +61,9 @@ void IImageProcessor<TPixel>.Execute()
/// <param name="source">the source image.</param>
public void Apply(ImageFrame<TPixel> 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);
}

/// <inheritdoc/>
Expand Down

0 comments on commit 9ec8dc7

Please sign in to comment.