Browse Source

misc: Improve broken locale.json crash message

Evan Husted 1 year ago
parent
commit
e15a207656
1 changed files with 1 additions and 2 deletions
  1. 1 2
      src/Ryujinx/Common/LocaleManager.cs

+ 1 - 2
src/Ryujinx/Common/LocaleManager.cs

@@ -160,8 +160,7 @@ namespace Ryujinx.Ava.Common.Locale
             {
             {
                 if (locale.Translations.Count != _localeData.Value.Languages.Count)
                 if (locale.Translations.Count != _localeData.Value.Languages.Count)
                 {
                 {
-                    Logger.Error?.Print(LogClass.UI, $"Locale key {{{locale.ID}}} is missing languages!");
-                    throw new Exception("Missing locale data!");
+                    throw new Exception($"Locale key {{{locale.ID}}} is missing languages! Has {locale.Translations.Count} translations, expected {_localeData.Value.Languages.Count}!");
                 }
                 }
 
 
                 if (!Enum.TryParse<LocaleKeys>(locale.ID, out var localeKey))
                 if (!Enum.TryParse<LocaleKeys>(locale.ID, out var localeKey))