Skip to content

Commit 4c56021

Browse files
More specific exception types for better error handling
1 parent 5cd7ae7 commit 4c56021

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Flow.Launcher.Infrastructure/PinyinAlphabet.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ private void CreateDoublePinyinTableFromStream(Stream jsonStream)
4848
string schemaKey = _settings.DoublePinyinSchema.ToString(); // Convert enum to string
4949
if (!table.TryGetValue(schemaKey, out var value))
5050
{
51-
throw new InvalidOperationException("DoublePinyinSchema is invalid or double pinyin table is broken.");
51+
throw new ArgumentException("DoublePinyinSchema is invalid or double pinyin table is broken.");
5252
}
5353
currentDoublePinyinTable = new ReadOnlyDictionary<string, string>(value);
5454
}

0 commit comments

Comments
 (0)