summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-08-08 19:42:40 -0400
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2022-08-08 19:42:40 -0400
commit08eafe7d898780e22d01b69e820aaa665f3a2d56 (patch)
tree382d4e0f5900fd9a89df0ca19d1240f95662355e /src/SMAPI/Framework
parent7a3b0e180f62e2e3094510e7e12eb64af6089560 (diff)
downloadSMAPI-08eafe7d898780e22d01b69e820aaa665f3a2d56.tar.gz
SMAPI-08eafe7d898780e22d01b69e820aaa665f3a2d56.tar.bz2
SMAPI-08eafe7d898780e22d01b69e820aaa665f3a2d56.zip
tweak new error text
Diffstat (limited to 'src/SMAPI/Framework')
-rw-r--r--src/SMAPI/Framework/ContentManagers/ModContentManager.cs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/SMAPI/Framework/ContentManagers/ModContentManager.cs b/src/SMAPI/Framework/ContentManagers/ModContentManager.cs
index c825b38c..8ecbc4cc 100644
--- a/src/SMAPI/Framework/ContentManagers/ModContentManager.cs
+++ b/src/SMAPI/Framework/ContentManagers/ModContentManager.cs
@@ -254,8 +254,10 @@ namespace StardewModdingAPI.Framework.ContentManagers
{
using FileStream stream = File.OpenRead(file.FullName);
using SKBitmap bitmap = SKBitmap.Decode(stream);
+
if (bitmap is null)
- throw new InvalidDataException("{file.FullName} appears not to be a valid image file.");
+ throw new InvalidDataException($"Failed to load {file.FullName}. This doesn't seem to be a valid PNG image.");
+
rawPixels = SKPMColor.PreMultiply(bitmap.Pixels);
width = bitmap.Width;
height = bitmap.Height;