Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.15.1
-
None
Description
The documentation is not explicit about the fact that error states are only entered for errors of state machine consistency according to the SCXML model, i.e. they are not intended to represent errors at the business logic level (like a DownloadFailedState).
The only information about this fact is in the documentation of the enum QStateMachine::Error. So, to realize what is going on, one has to read the documentation of QState::errorState(), QStateMachine::error(), and QStateMachine::Error, and understand how QState::errorState() relates to QStateMachine::error().
I am currently dealing with a state machine (which I didn't write) that doesn't handle errors correctly due to this confusion...
The best coherent explanation of the meaning of the error states is in https://doc.qt.io/qt-5/qstatemachine.html#details and that is really not very clear.
So I think this needs both a better overview documentation and better references to and / or summaries of the overview in the documentation of the details.