summaryrefslogtreecommitdiff
path: root/cmd2/exceptions.py
diff options
context:
space:
mode:
Diffstat (limited to 'cmd2/exceptions.py')
-rw-r--r--cmd2/exceptions.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/cmd2/exceptions.py b/cmd2/exceptions.py
index 1fffed1c..15787177 100644
--- a/cmd2/exceptions.py
+++ b/cmd2/exceptions.py
@@ -2,8 +2,17 @@
"""Custom exceptions for cmd2. These are NOT part of the public API and are intended for internal use only."""
-class Cmd2ArgparseException(Exception):
- """Custom exception class for when an argparse-decorated command has an error parsing its arguments"""
+class Cmd2ArgparseError(Exception):
+ """
+ Custom exception class for when a command has an error parsing its arguments.
+ This can be raised by argparse decorators or the command functions themselves.
+ The main use of this exception is to tell cmd2 not to run Postcommand hooks.
+ """
+ pass
+
+
+class Cmd2ShlexError(Exception):
+ """Raised when shlex fails to parse a command line string in StatementParser"""
pass