ErrorProne.NET icon indicating copy to clipboard operation
ErrorProne.NET copied to clipboard

False positive on ERP022 Exit point '}' swallows an unobserved exception

Open jafaber opened this issue 4 years ago • 0 comments

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 }}");
      }
    }

jafaber avatar Dec 09 '20 15:12 jafaber