It is impossible to answer this question without understanding your code and your coding rules, in particular, as they relate to exceptions.
But if your coding rules allow exceptions, then I suggest a general thumb rule:
Allow exceptions to propagate until they reach the context in which they can be handled properly. If they never reach the context in which they can be handled properly, allow your program to crash. Get a core dump and debug the problem.
"Handling" an exception in a specific context may be as simple as translating it into an error code or your own exception class, but in this case you must rebuild the new exception and allow it to propagate to the handler.
Do not use any form of catch handler for all exceptions to prevent application crashes or even to report errors and deaths. Instead, implement a system that will generate dumps in the event of an unhandled exception, and let your program die. The dump itself is enough log. You do not want everything to hang, because your system is in such a damaged state that it cannot be restored from.
source share