diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2020-03-05 13:45:11 -0500 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2020-03-05 13:45:11 -0500 |
commit | 4a2e0411da5c2626d93c9349757a341124eda299 (patch) | |
tree | cee8c7be31a1753d3a0a9e0e6f6c6f2abf00df31 /cmd2/exceptions.py | |
parent | 59739aa5b6f253814fb019a9e777056a6efb61ca (diff) | |
download | cmd2-git-4a2e0411da5c2626d93c9349757a341124eda299.tar.gz |
Prevent postcmd_hook from running when argparse fails
Diffstat (limited to 'cmd2/exceptions.py')
-rw-r--r-- | cmd2/exceptions.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd2/exceptions.py b/cmd2/exceptions.py index 747e2368..1c00794f 100644 --- a/cmd2/exceptions.py +++ b/cmd2/exceptions.py @@ -2,6 +2,11 @@ """Custom exceptions for cmd2. These are NOT part of the public API and are intended for internal use only.""" +class CmdLineError(Exception): + """Custom class for when an error occurred parsing the command line""" + pass + + class EmbeddedConsoleExit(SystemExit): """Custom exception class for use with the py command.""" pass |