Boost logo

Boost :

From: Andreas Huber (ahd6974-spamgroupstrap_at_[hidden])
Date: 2006-07-18 18:06:13


Jeremy Day wrote:
> On 7/18/06, Andreas Huber <ahd6974-spamgroupstrap_at_[hidden]> 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. 

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk