
Jeremy Day wrote:
On 7/18/06, Andreas Huber <ahd6974-spamgroupstrap@yahoo.com> wrote:
How is your approach better than:
[snip]
Heh. Well, when you put it that way it probably isn't. However, the function object that you pass into catcher could contain application state information.
so could ... class ExceptionHandler { int applicationState; public: void HandleException() { // same as the free function in last post } };
You could also use any functor that you happen to have around that has operator()(std::logic_error&), operator()(std::exception&), or operator()(void).
Right, but what can such a functor do better than ExceptionHandler::HandleException() above or ::HandleException() in the last post? Regards, -- Andreas Huber When replying by private email, please remove the words spam and trap from the address shown in the header.