Skip to content

Commit

Permalink
Report the original XML parse error
Browse files Browse the repository at this point in the history
Don't hide the XML error with an
unrelated exception (wrong number of arguments
to sys.stderr.write) but reraise it.
  • Loading branch information
benmwebb committed Nov 14, 2024
1 parent d6f0de6 commit c201375
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/build/make_cross_refs.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,8 @@ def main():
try:
et = ET.parse(f)
except ET.ParseError:
sys.stderr.write("ERROR parsing", f, "\n")
print("ERROR parsing", f, file=sys.stderr)
raise
fname = os.path.basename(f)
if fname.startswith("namespaceIMP"):
if verbose:
Expand Down

0 comments on commit c201375

Please sign in to comment.