From f9bbdc3d38405f59a82f427b868d6d5f7545738e Mon Sep 17 00:00:00 2001 From: "Lukas Rieger (Blue)" Date: Tue, 7 Feb 2023 11:03:21 +0100 Subject: [PATCH] Add invalid value to color-format exception --- src/main/java/de/bluecolored/bluemap/api/math/Color.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/de/bluecolored/bluemap/api/math/Color.java b/src/main/java/de/bluecolored/bluemap/api/math/Color.java index 6d9f884..9c5f369 100644 --- a/src/main/java/de/bluecolored/bluemap/api/math/Color.java +++ b/src/main/java/de/bluecolored/bluemap/api/math/Color.java @@ -136,7 +136,7 @@ private static int parseColorString(String val) { val.charAt(0) + val.charAt(0) + val.charAt(1) + val.charAt(1) + val.charAt(2) + val.charAt(2) + val.charAt(3) + val.charAt(3); if (val.length() == 6) val = val + "ff"; - if (val.length() != 8) throw new NumberFormatException("Invalid color format!"); + if (val.length() != 8) throw new NumberFormatException("Invalid color format: '" + val + "'!"); val = val.substring(6, 8) + val.substring(0, 6); // move alpha to front return Integer.parseUnsignedInt(val, 16); }