I've a scenario where a certain filter has to be matched before we can transition into a new state. So i've setup a filter, and registerd OnUnhandledEvent to throw exceptions if the event isn't handled. Unfortunately, it doesn't throw any errors. Automatonymous seems to mark this as handled because we are in the right state to handle the event.
Is there an option to manually throw an UnhandledException?
During(
this.ToBeReviewed,
When(this.Approve, IsCreatedByOtherUserAccountId())
.TransitionTo(this.Approved)
.Then(AddUserAcceptedEvent));
OnUnhandledEvent(x => x.Throw()); // Not working because the event is filtered above