diff options
author | Matthew Lemon <lemon@matthewlemon.com> | 2019-11-08 16:49:48 +0000 |
---|---|---|
committer | Matthew Lemon <lemon@matthewlemon.com> | 2019-11-08 16:49:48 +0000 |
commit | 938190a7b0f131d729bdc25637acdc0dde62516e (patch) | |
tree | 1ca83925b353cbdb131ee8005eedddc96696b1fe /datamaps | |
parent | cee458cc48021149eb20c104cc018f17d1fd993f (diff) |
included exception handling for when line is missing in datamap
Diffstat (limited to 'datamaps')
-rw-r--r-- | datamaps/main.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/datamaps/main.py b/datamaps/main.py index cb3c368..f607e6e 100644 --- a/datamaps/main.py +++ b/datamaps/main.py @@ -29,7 +29,8 @@ from engine.adapters import cli as engine_cli from engine.config import Config as engine_config from engine.exceptions import (DatamapFileEncodingError, MalFormedCSVHeaderException, - MissingCellKeyError, MissingSheetFieldError, + MissingCellKeyError, MissingLineError, + MissingSheetFieldError, NoApplicableSheetsInTemplateFiles, RemoveFileWithNoSheetRequiredByDatamap) @@ -167,6 +168,9 @@ def master(master): except DatamapFileEncodingError as e: logger.critical(e) sys.exit(1) + except MissingLineError as e: + logger.critical(e) + sys.exit(1) be_logger.info("Export complete.") @@ -204,3 +208,6 @@ def check(): except DatamapFileEncodingError as e: logger.critical(e) sys.exit(1) + except MissingLineError as e: + logger.critical(e) + sys.exit(1) |