aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2019-10-26 15:28:24 +0100
committerMatthew Lemon <lemon@matthewlemon.com>2019-10-26 15:28:24 +0100
commit5283dccd338e5e2f4cfc40a64f81e9de0b2d1e5f (patch)
tree41ee92c52b4545f2b363dd5e9e189103ca192b68
parent1ee2a207c2d4cb4d8393df3f64b790ac9e03bfa5 (diff)
exposing exceptions raised from missing sheet field in datamap
-rw-r--r--datamaps/main.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/datamaps/main.py b/datamaps/main.py
index 7328a3e..9c8b8da 100644
--- a/datamaps/main.py
+++ b/datamaps/main.py
@@ -28,6 +28,7 @@ from datamaps import __version__
from engine.adapters import cli as engine_cli
from engine.config import Config as engine_config
from engine.exceptions import (MalFormedCSVHeaderException,
+ MissingSheetFieldError,
NoApplicableSheetsInTemplateFiles,
RemoveFileWithNoSheetRequiredByDatamap)
@@ -116,6 +117,9 @@ def templates(to_master):
except FileNotFoundError as e:
logger.critical(e)
sys.exit(1)
+ except MissingSheetFieldError as e:
+ logger.critical(e)
+ sys.exit(1)
else:
click.secho("Not implemented yet. Try --to-master/-m flag")
@@ -147,6 +151,9 @@ def master(master):
except (FileNotFoundError, RuntimeError) as e:
logger.critical(str(e))
sys.exit(1)
+ except MissingSheetFieldError as e:
+ logger.critical(e)
+ sys.exit(1)
be_logger.info("Export complete.")