Boost logo

Boost :

Subject: Re: [boost] Boost::statechart: state reaction returned result
From: Andreas Huber (ahd6974-spamboostorgtrap_at_[hidden])
Date: 2008-10-22 05:27:35


> Could someone suggest me the recomended way of communicating error from fsm
> to the fsm user application?
> Assume state reaction unable to process event due to error and returns with
> discard_event(). As
> application calls process_event() to post an event which is of type "void".
> How do I make sure that my event
> was processed successfuly and not discarded?

There's a facility designed for exactly this purpose:

(see also documentation on unconsumed_event in the reference)

For your specific problem it's probably best to let the unconsumed_event
function throw an exception instead of posting a special event.

Hope that works for you, if not please let me know.


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, gregod at, cpdaniel at, john at