diff --git a/zero_to_one_hundred/configs/a_config_map.py b/zero_to_one_hundred/configs/a_config_map.py index a805826..5479d83 100644 --- a/zero_to_one_hundred/configs/a_config_map.py +++ b/zero_to_one_hundred/configs/a_config_map.py @@ -20,7 +20,7 @@ class LegendIcons: def __init__(self, persist_fs: APersistFS): self.map_yaml_path = os.getenv(AConfigMap.MAP_YAML_PATH) if self.map_yaml_path is None: - raise SomeError(f"map_yaml_path {self.map_yaml_path} is not valid") + raise SomeError(f"map_yaml_path {self.map_yaml_path} is not valid, please set it in the env") self.persist_fs = persist_fs def __repr__(self): diff --git a/zero_to_one_hundred/runner.py b/zero_to_one_hundred/runner.py index 993f5fd..7c846fb 100644 --- a/zero_to_one_hundred/runner.py +++ b/zero_to_one_hundred/runner.py @@ -3,6 +3,7 @@ import traceback from typing import List +from zero_to_one_hundred.exceptions.errors import SomeError from zero_to_one_hundred.factories.a_factory import AFactory from zero_to_one_hundred.factories.a_factory_provider import AFactoryProvider @@ -19,7 +20,12 @@ def run_core(argv: List[str], factory_provider: AFactoryProvider): try: factory = factory_provider.provide() [processor.process() for processor in factory.get_processor(argv) if processor] - + except SomeError as se: + print(se) + return + except FileNotFoundError as se: + print(se) + return except Exception as e: print(e) traceback.print_exc()