mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-19 13:15:00 -04:00
More informative state transition failure messages
This commit is contained in:
parent
783a2efc4d
commit
2a1360391d
@ -217,7 +217,7 @@ class FSM(DirectObject.DirectObject):
|
|||||||
return
|
return
|
||||||
|
|
||||||
if not self.request(request, *args):
|
if not self.request(request, *args):
|
||||||
raise RequestDenied, request
|
raise RequestDenied, "%s (from state: %s)" % (request, self.state)
|
||||||
|
|
||||||
def request(self, request, *args):
|
def request(self, request, *args):
|
||||||
"""Requests a state transition (or other behavior). The
|
"""Requests a state transition (or other behavior). The
|
||||||
@ -323,7 +323,7 @@ class FSM(DirectObject.DirectObject):
|
|||||||
# request) not listed in defaultTransitions and not
|
# request) not listed in defaultTransitions and not
|
||||||
# handled by an earlier filter.
|
# handled by an earlier filter.
|
||||||
if request[0] in string.uppercase:
|
if request[0] in string.uppercase:
|
||||||
raise RequestDenied, request
|
raise RequestDenied, "%s (from state: %s)" % (request, self.state)
|
||||||
|
|
||||||
# In either case, we quietly ignore unhandled command
|
# In either case, we quietly ignore unhandled command
|
||||||
# (lowercase) requests.
|
# (lowercase) requests.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user