From 92593a3895c8e045e059d6371027aa99e39a153f Mon Sep 17 00:00:00 2001 From: Eugene Triguba Date: Mon, 20 Jul 2020 22:53:38 -0500 Subject: Add MissingKeyError --- config_file/exceptions.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'config_file/exceptions.py') 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. + """ -- cgit v1.2.3