aboutsummaryrefslogtreecommitdiffstats
path: root/config_file/exceptions.py
diff options
context:
space:
mode:
authorEugene Triguba <eugenetriguba@gmail.com>2020-07-20 22:53:38 -0500
committerEugene Triguba <eugenetriguba@gmail.com>2020-07-20 22:53:38 -0500
commit92593a3895c8e045e059d6371027aa99e39a153f (patch)
treec540f516877e358c4d8569302f47bf074df6d626 /config_file/exceptions.py
parentAdd BaseParser for all other parsers (diff)
downloadconfig-file-92593a3895c8e045e059d6371027aa99e39a153f.zip
Add MissingKeyError
Diffstat (limited to 'config_file/exceptions.py')
-rw-r--r--config_file/exceptions.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/config_file/exceptions.py b/config_file/exceptions.py
index 03ef052..d11e373 100644
--- a/config_file/exceptions.py
+++ b/config_file/exceptions.py
@@ -2,10 +2,6 @@ class ConfigFileError(Exception):
"""A generic error from the package."""
-class ParsingError(ConfigFileError):
- """Unable to parse the configuration file."""
-
-
class MissingDependencyError(ConfigFileError):
"""
PyYaml or toml is not installed, but the parsers
@@ -17,3 +13,14 @@ class UnrecognizedFileError(ConfigFileError):
"""
A missing file extension or a file type not supported.
"""
+
+
+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.
+ """