Skip to content

Propagate exception flag #1063

@MrKevinWeiss

Description

@MrKevinWeiss

I would like to know if there is a way that I can propagate an exception instead of catch and print it?

I would expect that this can be some kwarg in the cmd2.__init__ that would allow for the exceptions to be raised instead of printed.

The use case is more for the onecmd functionality. We have a GUI that uses the some built-in commands like run_script and some other custom commands that are only implemented in the cmd2 based application. The exceptions should be caught and displayed by the GUI rather than hidden in the terminal.

Though this can be dealt with on the application level it, maybe I would not be the only one who wants this as an optional argument to be able to control the exceptions?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions