Open RicoSuter opened 8 years ago
This also goes for examples like these:
catch (SomeException ex)
{
ex.Data.Add("Faulting file", filename);
throw;
}
Here, it warns of ArgumentNullException
, even though "Faulting File"
is clearly not null (being a string literal). In general, more intelligent null checking would benefit Exceptional.
In general, would it be possible to hook into Resharper's more sophisticated nullability analysis? It's very powerful, especially when using their Resharper's annotations framework.
At the moment, exceptional does not use ReSharper's flow analysis API/tools... the big question for me is: Shouldn't we start a new analyzer project based on Roslyn to target a much bigger audience? I.e. port Exceptional to Roslyn?
Another one:
foreach (object key in Data.Keys)
{
object value = Data[key];
// ...
}
The getter warns of a possible ArgumentNullException
even though we are iterating through the keys of the dict.
Exceptional says that this code can give ArgumentNullException:
https://exceptional.codeplex.com/workitem/8337