I've heard the advice that you should avoid try catch blocks if possible since they're expensive.
My question is specifically about the .NET platform: Why are try blocks expensive?
Summary of Responses:
There are clearly two camps on this issue: those that say that try blocks are expensive, and those that say "maybe a tiny little bit".
Those that say try blocks are expensive normally mention the "high cost" of unwinding the call stack. Personally, I'm not convinced by that argument - specially after reading about how exceptions handlers are stored here.
Jon Skeet sits on the "maybe a tiny little bit" camp, and has written two articles on exceptions and performance which you can find here.
There was one article that I found extremely interesting: it talked about "other" performance implications of try blocks (not necessarily memory or cpu consumption). Peter Ritchie mentions that he found that code inside try blocks is not optimized as it'd otherwise be by the compiler. You can read about his findings here.
Finally, there's a blog entry about the issue from the man that implemented exceptions in the CLR. Go take a look at Chris Brumme's article here.
See Question&Answers more detail:os