
----- Original Message ----- From: "Andreas Huber" <ah2003@gmx.net>
E. Gladyshev wrote:
From: "Andreas Huber" <ah2003@gmx.net> [...]
Unfortunately, all FSM standards/publications I know are absolutely silent on error handling.
I can understand why. If you are referring to "error" as something unexpected, then it is out of the state machine realm.
If the errors were unexpected it would make little sense to handle them in the state machine, right?
Right.
The state machine mantra is complete behavioral determinism. If "error" is an expected condition, then it is just a normal event that is part of the state machine design.
When an entry action fails, you have the problem that the state machine is unstable because it would be a bad idea to just continue to enter other (inner) states (see Rationale). Since it is non-trivial to define what to do in such a situation, I think it is unfortunate that all these standards are silent on error handling. They implicitly force you define all your entry and transition actions in a way so that they can never fail.
Agree. All these standards imply that by definition nothing *unpredictable* can happen to the state machine. Eugene