Skip to content

Commit

Permalink
make errors less verbose when a schema fails to load
Browse files Browse the repository at this point in the history
  • Loading branch information
justdave committed Apr 30, 2024
1 parent 4d582bd commit fde6b13
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions make_schema_doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,11 @@ def get_versioned_tables(first, last):
new_schema, errors = get_schema.get_schema(schema_name, errors)
pair_up_schema(bz_name, new_schema)
schemas.append((bz_name, new_schema))
# if we have errors at this point, it's fatal, there's no point
# in letting make_versioned_schema spew a ton more of them.
if errors:
e = str.join('<br/>\n', errors)
raise BzSchemaProcessingException(e)
schema = make_versioned_schema(schemas,
colours,
tr)
Expand Down

0 comments on commit fde6b13

Please sign in to comment.