chore: Fix compilation warning messages.

This commit is contained in:
real-zony
2023-05-24 22:57:55 +08:00
parent 1e5c41852f
commit 383e2c5939
46 changed files with 145 additions and 152 deletions

View File

@@ -33,7 +33,7 @@ namespace ZonyLrcTools.Common.Infrastructure.Exceptions
var errors = jsonObj.SelectTokens("$.Error.*");
var warnings = jsonObj.SelectTokens("$.Warning.*");
errors.Union(warnings).Select(m => m.Parent).OfType<JProperty>().ToList()
.ForEach(m => ErrorMessages.Add(int.Parse(m.Name), m.Value.Value<string>()));
.ForEach(m => ErrorMessages.Add(int.Parse(m.Name), m.Value.Value<string>() ?? string.Empty));
}
public static string GetMessage(int errorCode) => ErrorMessages[errorCode];