ePrivacy and GPDR Cookie Consent by Cookie Consent

Unhandled event handler

Both the synchronous state machine and the asynchronous state machine provide the possibility to handle an event that was neither handled (no transition for the event) nor deferred. An handler can be set by calling the state machine's method set_behavior_of_unhandled_event_handler.

The unhandled event handler is called during event handling whenever the following conditions are true at the same time:

  • no transition is enabled for the event

  • the event is not deferred

This feature is available starting with yasmine version 1.3.0.

The use of the unhandled event handler is demonstrated in an example.