I have seen code like this (actually seeing another person type it up):
catch (Exception ex)
{
string exception = ex.ToString();
}
Is this code bad? If so, why? There is an appropriate "chain of catch handlers (eg more specific one above, filtering down to general catch all Exception, but in the string conversion of the Exception, I guess you are converting a lot more than is probably needed, to a string (All you really need is the InnerMessage or one of the other string properties depending on the scenario). Any thing else wrong with this code?
I have also seen devs put breakpoints on every line of code. What is the point of this? Why not just put one at the top and then use "run to cursor" (love that feature)?
Finally, what's the advantage of using break on all exceptions in Visual Studio?