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/>
void IImageProcessor<TPixel>.Execute()
{
try
{
this.BeforeImageApply();
// TODO: Try-catch logic temporarily removed, put it back.
this.BeforeImageApply();
foreach (ImageFrame<TPixel> sourceFrame in this.Source.Frames)
{
this.Apply(sourceFrame);
}
this.AfterImageApply();
}
#if DEBUG
catch (Exception)
foreach (ImageFrame<TPixel> 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();
}
/// <summary>

Loading…
Cancel
Save