feat: catch parser errors when using parse CLI

This commit is contained in:
Benjamin Lipp
2025-12-08 16:56:18 +01:00
parent 4d4c214600
commit 481977510d

View File

@@ -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__":