summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2021-03-23 11:30:38 -0400
committerKevin Van Brunt <kmvanbrunt@gmail.com>2021-03-23 11:30:54 -0400
commit3a4893ec32c6d38cad344667fead93e2eed8dc88 (patch)
tree65d6073d92769ff3f4e3fe023d47cafad6bacf73 /docs
parentfabe4cd01b339d628ffd0b8d9b202a4a41555b8b (diff)
downloadcmd2-git-3a4893ec32c6d38cad344667fead93e2eed8dc88.tar.gz
onecmd_plus_hooks() now sets self.exit_code when a SystemExit handled
Diffstat (limited to 'docs')
-rw-r--r--docs/features/commands.rst3
1 files changed, 3 insertions, 0 deletions
diff --git a/docs/features/commands.rst b/docs/features/commands.rst
index cc603f70..3b35a19b 100644
--- a/docs/features/commands.rst
+++ b/docs/features/commands.rst
@@ -175,6 +175,9 @@ the following interaction::
2
+Raising ``SystemExit(code)`` or calling ``sys.exit(code)`` in a command
+or hook function also sets ``self.exit_code`` and stops the program.
+
Exception Handling
------------------