This analyzer can be used without ThrowsAttribute. You don't need to define or use it to take the benefit of the basic analysis.
The basic thing we want to signal is that you should handle exceptions, rather than propagate them.
To reflect this, we are changing the message of THROW001 from Exception '{0}' is thrown but not handled or declared via ThrowsAttribute to just Exception '{0}' is thrown but not handled.
This leads to preciseness.
It should be clear from using this analyzer that your need to declare corresponding ThrowsAttribute to propagate the warnings.
This analyzer can be used without
ThrowsAttribute
. You don't need to define or use it to take the benefit of the basic analysis.The basic thing we want to signal is that you should handle exceptions, rather than propagate them.
To reflect this, we are changing the message of
THROW001
fromException '{0}' is thrown but not handled or declared via ThrowsAttribute
to justException '{0}' is thrown but not handled
.This leads to preciseness.
It should be clear from using this analyzer that your need to declare corresponding
ThrowsAttribute
to propagate the warnings.