Skip to content

Commit

Permalink
Improve error reporting for examples.yaml validation
Browse files Browse the repository at this point in the history
  • Loading branch information
avillar committed Aug 22, 2024
1 parent 8d71153 commit 620914f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ogc/bblocks/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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', {})
Expand Down

0 comments on commit 620914f

Please sign in to comment.