From 73d5110564ea0a49c3136ed65686a8eff45ace9e Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Sun, 1 Jan 2017 23:13:02 +1100 Subject: [PATCH] Use better exception --- src/ImageSharp/Image/Image{TColor}.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ImageSharp/Image/Image{TColor}.cs b/src/ImageSharp/Image/Image{TColor}.cs index ed556f2f3e..6bde8c3a55 100644 --- a/src/ImageSharp/Image/Image{TColor}.cs +++ b/src/ImageSharp/Image/Image{TColor}.cs @@ -51,7 +51,7 @@ namespace ImageSharp { if (!this.Configuration.ImageFormats.Any()) { - throw new NotSupportedException("No image formats have been configured."); + throw new InvalidOperationException("No image formats have been configured."); } this.CurrentImageFormat = this.Configuration.ImageFormats.First(); @@ -383,7 +383,7 @@ namespace ImageSharp { if (!this.Configuration.ImageFormats.Any()) { - throw new NotSupportedException("No image formats have been configured."); + throw new InvalidOperationException("No image formats have been configured."); } if (!stream.CanRead)