diff options
author | David Robillard <d@drobilla.net> | 2022-07-19 18:29:56 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-07-19 18:30:21 -0400 |
commit | 32ef40d0c87f51bb0867243069c775c144758bed (patch) | |
tree | 2da875d98118a922064f189be12f77c68c5a1559 | |
parent | b88f0fae47104a8d5e01a4780cdf93796ef85b47 (diff) | |
download | lv2-32ef40d0c87f51bb0867243069c775c144758bed.tar.xz |
Log syntax error origins when building index
-rwxr-xr-x | scripts/lv2_build_index.py | 6 |
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 |