From c201375314f91d1a9176dec0d84a2815999a6412 Mon Sep 17 00:00:00 2001 From: Ben Webb Date: Wed, 13 Nov 2024 16:32:00 -0800 Subject: [PATCH] Report the original XML parse error Don't hide the XML error with an unrelated exception (wrong number of arguments to sys.stderr.write) but reraise it. --- tools/build/make_cross_refs.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/build/make_cross_refs.py b/tools/build/make_cross_refs.py index 620c01b38a..fef83e37e0 100755 --- a/tools/build/make_cross_refs.py +++ b/tools/build/make_cross_refs.py @@ -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: