aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/lv2_build_index.py
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-07-19 18:29:56 -0400
committerDavid Robillard <d@drobilla.net>2022-07-19 18:30:21 -0400
commit32ef40d0c87f51bb0867243069c775c144758bed (patch)
tree2da875d98118a922064f189be12f77c68c5a1559 /scripts/lv2_build_index.py
parentb88f0fae47104a8d5e01a4780cdf93796ef85b47 (diff)
downloadlv2-32ef40d0c87f51bb0867243069c775c144758bed.tar.xz
Log syntax error origins when building index
Diffstat (limited to 'scripts/lv2_build_index.py')
-rwxr-xr-xscripts/lv2_build_index.py6
1 files changed, 5 insertions, 1 deletions
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