Browse Source

temporarily remove try-catch in ImageProcessor<TPixel>.Apply()

af/UniformUnmanagedMemoryPoolMemoryAllocator-02-MemoryGuards
Anton Firszov 5 years ago
parent
commit
7818ae0004
  1. 24
      src/ImageSharp/Processing/Processors/ImageProcessor{TPixel}.cs

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

@ -45,27 +45,15 @@ namespace SixLabors.ImageSharp.Processing.Processors
/// <inheritdoc/> /// <inheritdoc/>
void IImageProcessor<TPixel>.Execute() void IImageProcessor<TPixel>.Execute()
{ {
try // TODO: Try-catch logic temporarily removed, put it back.
{ this.BeforeImageApply();
this.BeforeImageApply();
foreach (ImageFrame<TPixel> sourceFrame in this.Source.Frames) foreach (ImageFrame<TPixel> sourceFrame in this.Source.Frames)
{
this.Apply(sourceFrame);
}
this.AfterImageApply();
}
#if DEBUG
catch (Exception)
{ {
throw; this.Apply(sourceFrame);
#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.AfterImageApply();
} }
/// <summary> /// <summary>

Loading…
Cancel
Save