Browse Source

Change error message to "...a palette chunk"

pull/2020/head
Brian Popow 4 years ago
parent
commit
29ddc6053e
  1. 2
      src/ImageSharp/Formats/Png/PngThrowHelper.cs
  2. 2
      tests/ImageSharp.Tests/Formats/Png/PngDecoderTests.cs

2
src/ImageSharp/Formats/Png/PngThrowHelper.cs

@ -22,7 +22,7 @@ namespace SixLabors.ImageSharp.Formats.Png
public static void ThrowNoData() => throw new InvalidImageContentException("PNG Image does not contain a data chunk");
[MethodImpl(InliningOptions.ColdPath)]
public static void ThrowMissingPalette() => throw new InvalidImageContentException("PNG Image does not contain palette chunk");
public static void ThrowMissingPalette() => throw new InvalidImageContentException("PNG Image does not contain a palette chunk");
[MethodImpl(InliningOptions.ColdPath)]
public static void ThrowInvalidChunkType() => throw new InvalidImageContentException("Invalid PNG data.");

2
tests/ImageSharp.Tests/Formats/Png/PngDecoderTests.cs

@ -278,7 +278,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Png
image.DebugSave(provider);
});
Assert.NotNull(ex);
Assert.Contains("PNG Image does not contain palette chunk", ex.Message);
Assert.Contains("PNG Image does not contain a palette chunk", ex.Message);
}
[Theory]

Loading…
Cancel
Save