Browse Source

remove processor exception wrapping forever, fixes #1827

pull/1730/head
Anton Firszov 5 years ago
parent
commit
9ec8dc7081
  1. 20
      src/ImageSharp/Processing/Processors/ImageProcessor{TPixel}.cs

20
src/ImageSharp/Processing/Processors/ImageProcessor{TPixel}.cs

@ -45,7 +45,6 @@ namespace SixLabors.ImageSharp.Processing.Processors
/// <inheritdoc/>
void IImageProcessor<TPixel>.Execute()
{
// TODO: Try-catch logic temporarily removed, put it back.
this.BeforeImageApply();
foreach (ImageFrame<TPixel> sourceFrame in this.Source.Frames)
@ -62,22 +61,9 @@ namespace SixLabors.ImageSharp.Processing.Processors
/// <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/>

Loading…
Cancel
Save