aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--paper2remarkable/exceptions.py15
1 files changed, 6 insertions, 9 deletions
diff --git a/paper2remarkable/exceptions.py b/paper2remarkable/exceptions.py
index a608bcc..66a329f 100644
--- a/paper2remarkable/exceptions.py
+++ b/paper2remarkable/exceptions.py
@@ -90,16 +90,13 @@ class RemarkableError(Error):
return msg
-class _CalledProcessError(CalledProcessError):
- """Exception raised when subprocesses fail.
+class _CalledProcessError(Error):
+ """Exception raised when subprocesses fail. """
- We subclass the CalledProcessError so we can add our custom error message.
- """
-
- def __init__(self, *args, **kwargs):
- super().__init__(*args, **kwargs)
+ def __init__(self, message):
+ self.message = message
def __str__(self):
- parent = super().__str__()
- msg = parent + GH_MSG
+ msg = "ERROR: {message}".format(message=self.message)
+ msg += GH_MSG
return msg