[boost] Re: Re: Re: [fsm] transition context and exit()
by Andreas Huber other posts by this author
Jun 5 2004 10:15AM messages near this date
[boost] Re: [fsm] transition context and exit()
|
Re: [boost] Re: Re: Re: [fsm] transition context and exit()
E. Gladyshev wrote:
> "Andreas Huber" <ah2003@[...].net> wrote in message
> news:c9qra1$2mq$1@[...]..
> > 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.
Hmmm, I guess I misinterpreted your earlier comments regarding unhandled
exceptions then, see below.
> 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?
I thought that in both cases it is guaranteed that the stack is unwound
(when we enter the catch ( ... ) handler). If so, then the scope guard
inside initiate() will destruct all state objects. Inside the catch ( ... )
handler the machine object is therefore in a defined state
(machine.terminated() returns true).
I interpreted your earlier comments such that stack unwinding is not
guaranteed *only* when we never catch the exception propagated out of the
state_machine<> ::initiate() function. As soon as the exception is caught
somewhere the stack will unwind and the machine object is in a defined state
when it is accessed.
What am I missing?
Regards,
Andreas
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Thread:
Andreas Huber
Andreas Huber
Andreas Huber
Darryl Green
Darryl Green
Darryl Green
Darryl Green
Andreas Huber
E. Gladyshev
Andreas Huber
Andreas Huber
E. Gladyshev
E. Gladyshev
Darryl Green
Andreas Huber
Johan Nilsson
Darryl Green
Andreas Huber
Andreas Huber
Rob Stewart
Andreas Huber
Rob Stewart
Johan Nilsson
Andreas Huber
Andreas Huber
Johan Nilsson
Johan Nilsson
Andreas Huber
Andreas Huber
Andreas Huber
Darryl Green
David Abrahams
Andreas Huber
Andreas Huber
Rob Stewart
Andreas Huber
Andreas Huber
Andreas Huber
Andreas Huber
David Abrahams
David Abrahams
David Abrahams
Andreas Huber
Andreas Huber
Darryl Green
David Bergman
David Abrahams
David Abrahams
David Abrahams
Andreas Huber
Andreas Huber
David Abrahams
Andreas Huber
Andreas Huber
Andreas Huber
Andreas Huber
Darryl Green
Andreas Huber
Robert Bell
David Abrahams
E. Gladyshev
Johan Nilsson
Jeff Flinn
Johan Nilsson
Andreas Huber
Jeff Flinn
E. Gladyshev
Andreas Huber
Andreas Huber
Iain K. Hanson
Robert Bell
David Abrahams
E. Gladyshev
Andreas Huber
Andreas Huber
David B. Held
Andreas Huber
Johan Nilsson
Johan Nilsson
Peter Dimov
Johan Nilsson
Topher Cooper
Johan Nilsson
Johan Nilsson
Andreas Huber
Robert Bell
Andreas Huber
Andreas Huber
Andreas Huber
E. Gladyshev
Andreas Huber
Andreas Huber
E. Gladyshev
E. Gladyshev
Andreas Huber
Andreas Huber
E. Gladyshev
David Abrahams
Andreas Huber
E. Gladyshev
E. Gladyshev
Rob Stewart
E. Gladyshev
E. Gladyshev
Rob Stewart
E. Gladyshev
Rob Stewart
E. Gladyshev
Andreas Huber
Andreas Huber
E. Gladyshev
Marshall Clow
Marshall Clow
E. Gladyshev
David Abrahams
Darryl Green
E. Gladyshev
Andreas Huber
Andreas Huber
Robert Bell
Darryl Green
Pavel Vozenilek
David Abrahams
Andreas Huber
David Abrahams
Gregory Colvin
Pavel Vozenilek
Andreas Huber
Robert Bell
Andreas Huber
Johan Nilsson
Andreas Huber
Andreas Huber
Johan Nilsson
Johan Nilsson
Rob Stewart
Johan Nilsson
Andreas Huber
Andreas Huber
David Abrahams
Andreas Huber
Andreas Huber
David Abrahams
Andreas Huber
Andreas Huber
Johan Nilsson
Rob Stewart
Kwee Heong Tan
David Abrahams
Andreas Huber
David Abrahams
David Abrahams
Andreas Huber
Andreas Huber
Andreas Huber
David Abrahams
Andreas Huber
John Fuller
David Abrahams
David Abrahams
Andreas Huber
Andreas Huber
Aleksey Gurtovoy
David Abrahams
David Abrahams
David Abrahams
Andreas Huber
David Abrahams
David Abrahams
|