aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Triguba <eugenetriguba@gmail.com>2020-08-07 08:50:06 -0500
committerEugene Triguba <eugenetriguba@gmail.com>2020-08-07 08:50:06 -0500
commit08a0725f7d4c34ef073110c30117ae520d081a01 (patch)
tree5ee7261261841f71c2e2bb7b46ff608b99ee1436
parentAdd utils tests (diff)
downloadconfig-file-08a0725f7d4c34ef073110c30117ae520d081a01.zip
Remove all custom exceptions except ParsingError
-rw-r--r--config_file/exceptions.py22
1 files changed, 6 insertions, 16 deletions
diff --git a/config_file/exceptions.py b/config_file/exceptions.py
index a8b8e5c..f68b7e8 100644
--- a/config_file/exceptions.py
+++ b/config_file/exceptions.py
@@ -1,19 +1,9 @@
-class ConfigFileError(Exception):
- """A generic error from the package."""
-
-
-class UnsupportedFileTypeError(ConfigFileError):
+class ParsingError(ValueError):
"""
- A missing file extension or a file type not supported.
- """
-
+ Unable to parse the configuration file.
-class ParsingError(ConfigFileError):
- """Unable to parse the configuration file."""
-
-
-class MissingKeyError(ParsingError):
- """
- A key that was specified (to retrieve, delete, etc.)
- is not in the file.
+ Since every module that parses the different
+ files has it's own decode error, this standardizes
+ it for the package to only raise a ParsingError
+ if a error occurs in those instances.
"""