From: E. Gladyshev (eegg_at_[hidden])
Date: 2004-06-04 17:20:41


"Andreas Huber" <ah2003_at_[hidden]> wrote in message
news:c9qra1$2mq$1_at_sea.gmane.org...
> E. Gladyshev wrote:
[...]
>
> What I meant was the default behavior we were talking about before. I
> rephrase, trying to stick more to accepted exception handling terminology:
> 1. By default, boost::fsm is completely neutral to exceptions. All
> exceptions thrown by user actions are propagated to the state machine
> client. If such an exception is caught by client code, all state objects
are
> destructed (but not exited).

I know where the confusion is.
I don't think that the last statement is technically correct.
The fact that the client catches the exception doesn't
guarantee that the state objects are destructed.

fsm::state_machine<...> machine;
try
{
   machine.initiate();
}
catch(...)
{
   ...
}

OR

try
{
   fsm::state_machine<...> *m = new fsm::state_machine<...>();
   m->initiate();
}
catch(...)
{
   ...
}

Do you mean when the state machine object
goes out of scope or deleted?

Best,
Eugene