From 33b3db6dce5f830018eb3b8535dd49e11b5b032d Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Mon, 28 Sep 2015 21:13:31 +0100 Subject: [PATCH] Added seperate exceptions file --- printr/exceptions.py | 5 +++++ printr/itterPrintr.py | 5 +---- 2 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 printr/exceptions.py diff --git a/printr/exceptions.py b/printr/exceptions.py new file mode 100644 index 0000000..cca1126 --- /dev/null +++ b/printr/exceptions.py @@ -0,0 +1,5 @@ +class FormattingError(Exception): + message = "Provided string doesn't contain formatting placeholders for {c} and/or {m}" + def __init__(self): + super().__init__(self.message) + diff --git a/printr/itterPrintr.py b/printr/itterPrintr.py index c179eb5..08de82a 100644 --- a/printr/itterPrintr.py +++ b/printr/itterPrintr.py @@ -1,7 +1,4 @@ -class FormattingException(Exception): - message = "Provided string doesn't contain formatting placeholders for {c} and/or {m}" - def __init__(self): - super().__init__(self.message) +from exceptions import FormattingError class ItterPrintr():