Quantcast
Channel: tsJensen - Principles
Viewing all articles
Browse latest Browse all 8

Try Catch Nothing Worst Code Ever

$
0
0

Tracking down a problem in a commercial .NET library today, I found this little gem (identifying code in the try removed):

try
{
   //any code that could fail in any way here
}
catch (Exception)
{
}

Not only should this construct not compile, any attempt to do so should cause your computer to explode.


Viewing all articles
Browse latest Browse all 8

Trending Articles