diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2020-04-11 14:42:37 -0400 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2020-04-11 14:42:37 -0400 |
commit | 5b4bec9d56b2907a168d0688b0a3cde64043d048 (patch) | |
tree | d2eb512710c724012a6533250d2173b6a8f0991f /cmd2/exceptions.py | |
parent | f223e96cfb0be13881ebf304d0720f0633b7fe46 (diff) | |
download | cmd2-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.py | 5 |
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 |