In general, I tend to use try/catch for code which has multiple failure points for which the failures have a common handler.
In my experience, this is typically co
In my experience the biggest problem with try/catch blocks are we often try to catch exceptions too generically. For instance, if I wrap my main function with a try/catch block that catches (...) I am basically trying to not allow my program to crash b/c of a thrown exception.
The problem with this approach as I see it is two fold. 1) While I'm testing and debugging I don't see any errors and I don't get the opportunity to fix them. 2) It's really kind of taking the lazy way out. Instead of thinking through the problems that may come up and figuring out what the edge cases are I'm just trying not to fail. Trying not to fail is a lot different than trying to succeed.