From 4c560210cd28e0a83372e5909e3e7003db690f16 Mon Sep 17 00:00:00 2001 From: VictoriousRaptor <10308169+VictoriousRaptor@users.noreply.github.com> Date: Sun, 13 Jul 2025 19:36:31 +0800 Subject: [PATCH] More specific exception types for better error handling --- Flow.Launcher.Infrastructure/PinyinAlphabet.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher.Infrastructure/PinyinAlphabet.cs b/Flow.Launcher.Infrastructure/PinyinAlphabet.cs index d878a3d0e..b5344c7e9 100644 --- a/Flow.Launcher.Infrastructure/PinyinAlphabet.cs +++ b/Flow.Launcher.Infrastructure/PinyinAlphabet.cs @@ -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(value); }