From 7494d8664a171380f5ae2b9316f24738e43e1770 Mon Sep 17 00:00:00 2001 From: Kyle Matthew Hedden Date: Mon, 12 Dec 2022 13:18:17 -0500 Subject: [PATCH] add the provided color name to the error string --- MVMCoreUI/CustomPrimitives/Color.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MVMCoreUI/CustomPrimitives/Color.swift b/MVMCoreUI/CustomPrimitives/Color.swift index 42c7a600..b251f778 100644 --- a/MVMCoreUI/CustomPrimitives/Color.swift +++ b/MVMCoreUI/CustomPrimitives/Color.swift @@ -106,7 +106,7 @@ public final class Color: Codable { if colorString.hasPrefix("#") { hex = colorString.replacingOccurrences(of: "#", with: "") } else { - guard let hexString = UIColor.names[colorString]?.hex else { throw ColorError.badName(reason: "Check the spelling of your color.") } + guard let hexString = UIColor.names[colorString]?.hex else { throw ColorError.badName(reason: "Check the spelling of your color: \(colorString)") } hex = hexString.replacingOccurrences(of: "#", with: "") name = colorString }