Boost logo

Boost :

From: E. Gladyshev (eegg_at_[hidden])
Date: 2004-05-27 02:37:47

----- Original Message -----
From: "Darryl Green" <darryl.green_at_[hidden]>

> Maybe I'm just being thick, but the whole idea of a failing exit action
> rather odd to me. This has nothing to do with whether the exit action is a
> destructor or not.

The same could be said about entry action.
I've just finished a project with a Moore type state machine.

If the entry or exit action throws, the state machine is in undefined
unless you define the throw event as a legitimate event
which causes a transition. However I don't see how
this can be done generically.

In our project, we decided:
1. The state machine *framework* never catches user exceptions.
2. The framework doesn't have a concept of failed actions at all.
    Any action has to be completed.

In this model, any user exception is sent upstairs and it is up to higher
intelligence to decide whether to trigger the stack unwinding
or do something else.

All fault situations during an action are *expected* and it
is a responsibility of this action to generate an appropriate
event that will cause a transition to a fault handling state or
stop the process.
In other words, failed actions are part of
the state machine design.


Boost list run by bdawes at, gregod at, cpdaniel at, john at