diff options
| author | Eugene Triguba <eugenetriguba@gmail.com> | 2020-07-20 22:53:38 -0500 |
|---|---|---|
| committer | Eugene Triguba <eugenetriguba@gmail.com> | 2020-07-20 22:53:38 -0500 |
| commit | 92593a3895c8e045e059d6371027aa99e39a153f (patch) | |
| tree | c540f516877e358c4d8569302f47bf074df6d626 /config_file/exceptions.py | |
| parent | Add BaseParser for all other parsers (diff) | |
| download | config-file-92593a3895c8e045e059d6371027aa99e39a153f.zip | |
Add MissingKeyError
Diffstat (limited to 'config_file/exceptions.py')
| -rw-r--r-- | config_file/exceptions.py | 15 |
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. + """ |