From 32ef40d0c87f51bb0867243069c775c144758bed Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 19 Jul 2022 18:29:56 -0400 Subject: Log syntax error origins when building index --- scripts/lv2_build_index.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/lv2_build_index.py b/scripts/lv2_build_index.py index bc91911..8238b49 100755 --- a/scripts/lv2_build_index.py +++ b/scripts/lv2_build_index.py @@ -41,7 +41,11 @@ def _load_ttl(data_paths, exclude=None): model = rdflib.ConjunctiveGraph() for path in data_paths: if exclude is None or path not in exclude: - model.parse(path, format="n3") + try: + model.parse(path, format="n3") + except SyntaxError as e: + sys.stderr.write(f"error: Failed to parse {path}\n") + raise e return model -- cgit v1.2.1