i know i throw an exception when a method is not able to handle it,
but what should i consider when i decide where to catch it?
its a very general question i know, but i have only just began reading about it.
Another general rule might be "at the point that has enough context about what was being done to be able to react to it". Low level method calls are unlikely to know what's going on, and what should be done next. At a higher level call it might know whether it should try again, log an error and carry on, show a message to the user, redirect the user to an error page, etc.
posted 8 years ago
I think I meant the same as Matthew Brown, but you really put it a lot better than I did.