Update message when processing event and not initialized
This commit is contained in:
parent
8c897cfa6f
commit
eb169daa98
|
@ -186,8 +186,9 @@ class FiniteMachine(object):
|
||||||
def _pre_process_event(self, event):
|
def _pre_process_event(self, event):
|
||||||
current = self._current
|
current = self._current
|
||||||
if current is None:
|
if current is None:
|
||||||
raise excp.NotInitialized("Can only process events after"
|
raise excp.NotInitialized("Can not process event '%s'; the state"
|
||||||
" being initialized (not before)")
|
" machine hasn't been initialized"
|
||||||
|
% event)
|
||||||
if self._states[current.name]['terminal']:
|
if self._states[current.name]['terminal']:
|
||||||
raise excp.InvalidState("Can not transition from terminal"
|
raise excp.InvalidState("Can not transition from terminal"
|
||||||
" state '%s' on event '%s'"
|
" state '%s' on event '%s'"
|
||||||
|
|
Loading…
Reference in New Issue