From 3a0a044fe2c6d964ff589aebb1215f34c76d5bda Mon Sep 17 00:00:00 2001 From: Ynse Hoornenborg Date: Sat, 4 Dec 2021 21:14:25 +0100 Subject: [PATCH] Improve exception messages --- src/ImageSharp/Formats/Pbm/PbmDecoderCore.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/ImageSharp/Formats/Pbm/PbmDecoderCore.cs b/src/ImageSharp/Formats/Pbm/PbmDecoderCore.cs index 1aeecc16ff..b2be74ea14 100644 --- a/src/ImageSharp/Formats/Pbm/PbmDecoderCore.cs +++ b/src/ImageSharp/Formats/Pbm/PbmDecoderCore.cs @@ -94,8 +94,7 @@ namespace SixLabors.ImageSharp.Formats.Pbm int bytesRead = stream.Read(buffer); if (bytesRead != 2 || buffer[0] != 'P') { - // Empty or not an PPM image. - throw new InvalidImageContentException("TODO"); + throw new InvalidImageContentException("Empty or not an PPM image."); } switch ((char)buffer[1]) @@ -134,7 +133,7 @@ namespace SixLabors.ImageSharp.Formats.Pbm // PAM image: sequence of images. // Not implemented yet default: - throw new NotImplementedException("TODO"); + throw new InvalidImageContentException("Unknown of not implemented image type encountered."); } stream.SkipWhitespaceAndComments();