Discovering Empty Try/Catch Blocks – Christopher Bennage

Regex in Find dialog in VS.. Of couse! I’ve seen it, but never used it.

I HATE, really, HATE empty try/catch blocks. Almost just as bade are these:

try {
   blah blah;
}
catch(Exception ex) {
    Log(ex.Message);
    throw ex;
}

Now we loose the stack so we don’t really know what happened when the original exception was thrown. 

Discovering Empty Try/Catch Blocks – Christopher Bennage

Leave a Reply