Boost logo

Boost :

From: Marshall Clow (marshall_at_[hidden])
Date: 2004-05-27 16:26:49


>----- Original Message -----
>From: "Andreas Huber" <ah2003_at_[hidden]>
>To: <boost_at_[hidden]>
>Sent: Thursday, May 27, 2004 9:51 AM
>Subject: [boost] Re: [prereview request][fsm]
>
>[...]
>
>>
>> Yes, you can do that if you want (it is a per state machine policy). The
>> default is to always dispatch an exception_thrown event.
>>
>
>Interesting solution!
>catch
>{
> try { throw; }
> catch( type1 ) { ... }
>}
>
>never thought about it. This is why I didn't know
>how to make it generic. It makes sense now.

I've written code like that.
It lets you centralize a bunch of exception handling:

        try { ...code that throws }
        catch ( ... ) { HandleExceptions (); }

void HandleExceptions () {
        try { throw; }
        catch ( type1 ) {}
        catch ( type2 ) {}
        catch ( type3 ) {}
and so on.
        }

-- 
-- Marshall
Marshall Clow     Idio Software   <mailto:marshall_at_[hidden]>
I want a machine that thinks I'm more important than it is, and acts like it.
-- Eric Herrmann

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