More specific exception types for better error handling

This commit is contained in:
VictoriousRaptor 2025-07-13 19:36:31 +08:00
parent 5cd7ae72f4
commit 4c560210cd

View file

@ -48,7 +48,7 @@ namespace Flow.Launcher.Infrastructure
string schemaKey = _settings.DoublePinyinSchema.ToString(); // Convert enum to string
if (!table.TryGetValue(schemaKey, out var value))
{
throw new InvalidOperationException("DoublePinyinSchema is invalid or double pinyin table is broken.");
throw new ArgumentException("DoublePinyinSchema is invalid or double pinyin table is broken.");
}
currentDoublePinyinTable = new ReadOnlyDictionary<string, string>(value);
}