summaryrefslogtreecommitdiff
path: root/cmd2/cmd2.py
diff options
context:
space:
mode:
Diffstat (limited to 'cmd2/cmd2.py')
-rw-r--r--cmd2/cmd2.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py
index 0b198111..d01dfaa0 100644
--- a/cmd2/cmd2.py
+++ b/cmd2/cmd2.py
@@ -95,6 +95,7 @@ from .exceptions import (
CompletionError,
EmbeddedConsoleExit,
EmptyStatement,
+ PassThroughException,
RedirectionError,
SkipPostcommandHooks,
)
@@ -2259,6 +2260,8 @@ class Cmd(cmd.Cmd):
raise ex
except SystemExit:
stop = True
+ except PassThroughException as ex:
+ raise ex.wrapped_ex
except Exception as ex:
self.pexcept(ex)
finally:
@@ -2269,6 +2272,8 @@ class Cmd(cmd.Cmd):
raise ex
except SystemExit:
stop = True
+ except PassThroughException as ex:
+ raise ex.wrapped_ex
except Exception as ex:
self.pexcept(ex)