Problem
The error_on_execution attribute name is ambiguous. It reads as "error on execution" (describing a problem) rather than conveying the behavior it controls (catching errors as internal events instead of propagating them).
Compared to the other behavioral attributes, it's the only one whose name doesn't clearly describe what it does:
| Attribute |
Natural reading |
Clear? |
allow_event_without_transition |
"allow event without transition" |
✅ |
enable_self_transition_entries |
"enable entries on self-transitions" |
✅ |
atomic_configuration_update |
"atomic configuration update" |
✅ |
error_on_execution |
"error on execution" (??) |
❌ |
Proposal
Rename to catch_errors_as_events — it says exactly what it does:
True → errors in callbacks are caught and dispatched as error.execution events.
False → errors propagate to the caller as normal Python exceptions.
Scope
This is a pre-release v3 change. Since v3 hasn't been released yet, there's no backward compatibility concern for error_on_execution on StateChart. However, the rename touches:
StateChart / StateMachine class definitions
- Engine code (
base.py, sync.py, async_.py)
- All documentation references (
behaviour.md, error_handling.md, actions.md, processing_model.md, guards.md, release notes)
- Tests that reference the attribute
- The
_on_error_handler engine method
Best handled in a dedicated session due to the number of files involved.
Problem
The
error_on_executionattribute name is ambiguous. It reads as "error on execution" (describing a problem) rather than conveying the behavior it controls (catching errors as internal events instead of propagating them).Compared to the other behavioral attributes, it's the only one whose name doesn't clearly describe what it does:
allow_event_without_transitionenable_self_transition_entriesatomic_configuration_updateerror_on_executionProposal
Rename to
catch_errors_as_events— it says exactly what it does:True→ errors in callbacks are caught and dispatched aserror.executionevents.False→ errors propagate to the caller as normal Python exceptions.Scope
This is a pre-release v3 change. Since v3 hasn't been released yet, there's no backward compatibility concern for
error_on_executiononStateChart. However, the rename touches:StateChart/StateMachineclass definitionsbase.py,sync.py,async_.py)behaviour.md,error_handling.md,actions.md,processing_model.md,guards.md, release notes)_on_error_handlerengine methodBest handled in a dedicated session due to the number of files involved.