ErrorProne.NET
ErrorProne.NET copied to clipboard
False positive on ERP022 Exit point '}' swallows an unobserved exception
The following method incorrectly throws Warning ERP022 Exit point '}' swallows an unobserved exception.". The variable exception
is put into an anonymous type.
public List<T> LoadList<T>(string key, string subKey = "") {
try {
} catch (Exception exception) {
Logger.Fatal?.Add($"{new { key, subKey, exception }}");
}
}