From dbad18925fa58674bee8b6af26daba4271f60167 Mon Sep 17 00:00:00 2001 From: Chris Cameron Date: Tue, 26 May 2020 11:18:58 -0400 Subject: [PATCH] feat: Clarifying which culture failed to load when throwing an exception --- ICD.Common.Utils/Globalization/IcdCultureInfo.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ICD.Common.Utils/Globalization/IcdCultureInfo.cs b/ICD.Common.Utils/Globalization/IcdCultureInfo.cs index 37012c1..e755a4c 100644 --- a/ICD.Common.Utils/Globalization/IcdCultureInfo.cs +++ b/ICD.Common.Utils/Globalization/IcdCultureInfo.cs @@ -506,7 +506,7 @@ namespace ICD.Common.Utils.Globalization CultureTypes cultureTypes; if (!s_DictAvailableCulturesByLcid.TryGetValue(culture, out cultureTypes)) - throw new ArgumentException("not supported"); + throw new ArgumentException(string.Format("Culture {0} not supported", culture)); if (!s_IsDatabasePresent || (cultureTypes & CultureTypes.InstalledWin32Cultures) != 0) { @@ -551,7 +551,7 @@ namespace ICD.Common.Utils.Globalization CultureTypes cultureTypes; if (!s_DictAvailableCulturesByName.TryGetValue(name, out cultureTypes)) - throw new ArgumentException("not supported"); + throw new ArgumentException(string.Format("Culture {0} not supported", name)); if (!s_IsDatabasePresent || (cultureTypes & CultureTypes.InstalledWin32Cultures) != 0) {