posted 21 years ago
The important question here is: if methodA() throws an error, do you want to perform methodB() next, or not? In many cases the answer is no, because methodB() is written in such a way that it assumes methodA() has already been completed, and if that's not the case, methodB() may well be meaningless, or throw another error. So I'd say that option 2 is usually what you want. But there are times when you really do want methodB() to be performed even if methodA() fails - in this case, option 1 is preferred. I don't think we can say any more without knowing what methodA() and methodB() are supposed to do.
"I'm not back." - Bill Harding, Twister