Browse Source

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

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

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

@ -61,24 +61,11 @@ namespace SixLabors.ImageSharp.Processing.Processors
/// </summary> /// </summary>
/// <param name="source">the source image.</param> /// <param name="source">the source image.</param>
public void Apply(ImageFrame<TPixel> source) public void Apply(ImageFrame<TPixel> source)
{
try
{ {
this.BeforeFrameApply(source); this.BeforeFrameApply(source);
this.OnFrameApply(source); this.OnFrameApply(source);
this.AfterFrameApply(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
}
}
/// <inheritdoc/> /// <inheritdoc/>
public void Dispose() public void Dispose()

Loading…
Cancel
Save