1

I am looking at Boost StateChart lib documentation, and I am not able to find out a way to catch abnormal events.

For example, if I am in state A, which handles only EventA, and I call

machine.proces_event(EventB())

The event seems to get silently ignored. Is there a way for me to catch those, so I can log the state & the illegal action?

Thank you.

user252652
  • 179
  • 1
  • 1
  • 9
  • I have since found the answer to this. We just need to implement consumed_event function in our stateMachine. void unconsumed_event( const sc::event_base & e) {} – user252652 Nov 30 '11 at 15:56
  • 1
    please add an answer to your question – Sam Miller Nov 30 '11 at 16:04
  • I will. But when I tried to add that answer yesterday, I couldn't because I have less than n points, and was trying to answer in less than 8 hours of posting the question. – user252652 Dec 01 '11 at 07:19

1 Answers1

6

I have since found the answer to this. We just need to implement consumed_event function in our stateMachine.

void unconsumed_event( const sc::event_base & e) {} 
user252652
  • 179
  • 1
  • 1
  • 9