mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 810742 - Handle callee thrown exceptions when invoking a mach command; r=jhammel
This commit is contained in:
parent
e401276626
commit
3966850da2
@ -314,6 +314,18 @@ To see more help for a specific command, run:
|
|||||||
# The first frame is us and is never used.
|
# The first frame is us and is never used.
|
||||||
stack = traceback.extract_tb(exc_tb)[1:]
|
stack = traceback.extract_tb(exc_tb)[1:]
|
||||||
|
|
||||||
|
# If we have nothing on the stack, the exception was raised as part
|
||||||
|
# of calling the @Command method itself. This likely means a
|
||||||
|
# mismatch between @CommandArgument and arguments to the method.
|
||||||
|
# e.g. there exists a @CommandArgument without the corresponding
|
||||||
|
# argument on the method. We handle that here until the module
|
||||||
|
# loader grows the ability to validate better.
|
||||||
|
if not len(stack):
|
||||||
|
print(COMMAND_ERROR)
|
||||||
|
self._print_exception(sys.stdout, exc_type, exc_value,
|
||||||
|
traceback.extract_tb(exc_tb))
|
||||||
|
return 1
|
||||||
|
|
||||||
# Split the frames into those from the module containing the
|
# Split the frames into those from the module containing the
|
||||||
# command and everything else.
|
# command and everything else.
|
||||||
command_frames = []
|
command_frames = []
|
||||||
|
Loading…
Reference in New Issue
Block a user