NDepend should not consider exception catch() parameters as method variables
NDepend's method variable count metric considers each exception catch statement to add another variable to the method's variable count. I can understand how those strictly would be considered function variables, but how is this helpful for code quality? Properly handling exceptions should not compete with keeping the method variable count low. Surely it is not bad practice to catch a number of specific exceptions. It seems like bad practice to create a separate wrapper function just to try/catch exceptions in the inner function. How would one refactor this to make it better?
2
votes
jerry rubinow
shared this idea