I have been using exception handling for some time and have installed Resharper and now getting all sorts of messages saying I should and should be doing this. Anyway, it says I shouldn't be using try and catch blocks around my code. So where do I put them to catch exceptions? I have seen people looking for certain exceptions like File not found, but what about all the other errors or exceptions that are unique?
Here's an example of some exception handling it moans about:
try
{
var rnd = new Random();
var buffer = new byte[sizeof(UInt64)];
rnd.NextBytes(buffer);
}
catch (Exception)
{
throw;
}
Does anyone have links for best practices for exception handling that would keep re-sharper happy?