Skip to content

Commit

Permalink
Issue #140: add error handling.
Browse files Browse the repository at this point in the history
  • Loading branch information
enzet committed Aug 17, 2022
1 parent 692997f commit 199dff9
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions map_machine/mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,11 @@ def render_map(arguments: argparse.Namespace) -> None:
:param arguments: command-line arguments
"""
scheme: Scheme = Scheme.from_file(
workspace.find_scheme_path(arguments.scheme)
)
scheme_path: Optional[Path] = workspace.find_scheme_path(arguments.scheme)
if scheme_path is None:
fatal(f"Scheme `{arguments.scheme}` not found.")

scheme: Scheme = Scheme.from_file(scheme_path)

configuration: MapConfiguration = MapConfiguration.from_options(
scheme, arguments, float(arguments.zoom)
Expand Down

0 comments on commit 199dff9

Please sign in to comment.