summaryrefslogtreecommitdiff
path: root/cmd2/exceptions.py
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2020-04-11 14:42:37 -0400
committerKevin Van Brunt <kmvanbrunt@gmail.com>2020-04-11 14:42:37 -0400
commit5b4bec9d56b2907a168d0688b0a3cde64043d048 (patch)
treed2eb512710c724012a6533250d2173b6a8f0991f /cmd2/exceptions.py
parentf223e96cfb0be13881ebf304d0720f0633b7fe46 (diff)
downloadcmd2-git-5b4bec9d56b2907a168d0688b0a3cde64043d048.tar.gz
Simplfied _redirect_output() by raising exception instead of returning bool
Diffstat (limited to 'cmd2/exceptions.py')
-rw-r--r--cmd2/exceptions.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd2/exceptions.py b/cmd2/exceptions.py
index 15787177..635192e1 100644
--- a/cmd2/exceptions.py
+++ b/cmd2/exceptions.py
@@ -24,3 +24,8 @@ class EmbeddedConsoleExit(SystemExit):
class EmptyStatement(Exception):
"""Custom exception class for handling behavior when the user just presses <Enter>."""
pass
+
+
+class RedirectionError(Exception):
+ """Custom exception class for when redirecting or piping output fails"""
+ pass