Browse Source

do not rethrow in ImageProcessor<T>.Apply()

af/UniformUnmanagedMemoryPoolMemoryAllocator-02-MemoryGuards
Anton Firszov 4 years ago
parent
commit
9092ea6300
  1. 19
      src/ImageSharp/Processing/Processors/ImageProcessor{TPixel}.cs

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

@ -62,22 +62,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