From 620914fd000dd7256ed3a733927e9a6948b558b6 Mon Sep 17 00:00:00 2001 From: Alejandro Villar Date: Thu, 22 Aug 2024 13:42:08 +0200 Subject: [PATCH] Improve error reporting for examples.yaml validation --- ogc/bblocks/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ogc/bblocks/models.py b/ogc/bblocks/models.py index da5d695..4bec025 100644 --- a/ogc/bblocks/models.py +++ b/ogc/bblocks/models.py @@ -140,7 +140,8 @@ def _load_examples(self): try: jsonschema.validate(examples, get_schema('examples')) except Exception as e: - raise BuildingBlockError('Error validating building block examples (examples.yaml)') from e + raise BuildingBlockError(f'Error validating building block examples (examples.yaml)' + f' for {self.identifier}') from e if isinstance(examples, dict): prefixes = examples.get('prefixes', {})