From 481977510d84ed2ed1cadfdbf5a12db601f0a456 Mon Sep 17 00:00:00 2001 From: Benjamin Lipp Date: Mon, 8 Dec 2025 16:56:18 +0100 Subject: [PATCH] feat: catch parser errors when using parse CLI --- marzipan/src/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/marzipan/src/__init__.py b/marzipan/src/__init__.py index aed91c5..220561a 100644 --- a/marzipan/src/__init__.py +++ b/marzipan/src/__init__.py @@ -302,7 +302,10 @@ def metaverif(repo_path, tmpdir, file): @main.command() @click.argument("file_path") def parse(file_path): - parse_main(file_path) + try: + parse_main(file_path) + except pkgs.lark.exceptions.UnexpectedCharacters as e: + logger.error(f"Error {type(e).__name__} parsing {file_path}: {e}") if __name__ == "__main__":