erikzenker / hsm

Finite state machine library based on the boost hana meta programming library. It follows the principles of the boost msm and boost sml libraries, but tries to reduce own complex meta programming code to a minimum.
MIT License
187 stars 18 forks source link

[FEATURE] Improve error on unknown event type is processed #145

Closed erikzenker closed 2 years ago

erikzenker commented 3 years ago

Problem

In the case you call hsm.process_event(MyEvent{}) with an event type that is not known to the state machine than a complex error is printed by the compiler.

Proposed Solution

Assert statically that the event processed is part of the list of events.

erikzenker commented 2 years ago

fixed with #171