mirror of
https://github.com/enzet/map-machine.git
synced 2025-07-29 14:28:59 +02:00
Issue #140: add error handling.
This commit is contained in:
parent
692997f54a
commit
199dff9599
1 changed files with 5 additions and 3 deletions
|
@ -263,9 +263,11 @@ def render_map(arguments: argparse.Namespace) -> None:
|
||||||
|
|
||||||
:param arguments: command-line arguments
|
:param arguments: command-line arguments
|
||||||
"""
|
"""
|
||||||
scheme: Scheme = Scheme.from_file(
|
scheme_path: Optional[Path] = workspace.find_scheme_path(arguments.scheme)
|
||||||
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(
|
configuration: MapConfiguration = MapConfiguration.from_options(
|
||||||
scheme, arguments, float(arguments.zoom)
|
scheme, arguments, float(arguments.zoom)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue