Browse Source

Improve exception messages

pull/1851/head
Ynse Hoornenborg 5 years ago
parent
commit
3a0a044fe2
  1. 5
      src/ImageSharp/Formats/Pbm/PbmDecoderCore.cs

5
src/ImageSharp/Formats/Pbm/PbmDecoderCore.cs

@ -94,8 +94,7 @@ namespace SixLabors.ImageSharp.Formats.Pbm
int bytesRead = stream.Read(buffer); int bytesRead = stream.Read(buffer);
if (bytesRead != 2 || buffer[0] != 'P') if (bytesRead != 2 || buffer[0] != 'P')
{ {
// Empty or not an PPM image. throw new InvalidImageContentException("Empty or not an PPM image.");
throw new InvalidImageContentException("TODO");
} }
switch ((char)buffer[1]) switch ((char)buffer[1])
@ -134,7 +133,7 @@ namespace SixLabors.ImageSharp.Formats.Pbm
// PAM image: sequence of images. // PAM image: sequence of images.
// Not implemented yet // Not implemented yet
default: default:
throw new NotImplementedException("TODO"); throw new InvalidImageContentException("Unknown of not implemented image type encountered.");
} }
stream.SkipWhitespaceAndComments(); stream.SkipWhitespaceAndComments();

Loading…
Cancel
Save