mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
Improve Color.FromHex exception message.
It now includes the invalid hexcode argument. Something in content kept getting these exceptions on prod and knowing the invalid argument would be very helpful when debugging these in the future.
This commit is contained in:
@@ -880,7 +880,7 @@ namespace Robust.Shared.Maths
|
||||
return color.Value;
|
||||
if (fallback.HasValue)
|
||||
return fallback.Value;
|
||||
throw new ArgumentException("Invalid color code and no fallback provided.", nameof(hexColor));
|
||||
throw new ArgumentException($"Invalid color code \"{new string(hexColor)}\" and no fallback provided.", nameof(hexColor));
|
||||
}
|
||||
|
||||
public static Color FromXaml(string name)
|
||||
|
||||
Reference in New Issue
Block a user