diff --git a/scripts/doc/linked-xml-file.py b/scripts/doc/linked-xml-file.py
index e5d00b9789115c045f5bde0e8c9fc0b811c96637..f598fff0aa5aedc074efe641c73bd7d5661eed13 100755
--- a/scripts/doc/linked-xml-file.py
+++ b/scripts/doc/linked-xml-file.py
@@ -216,7 +216,12 @@ for (dirpath, dirnames, filenames) in os.walk(datadir, topdown=False):
 <tt>
 """ % (pagename, fn))
 
-                xmlroot = ET.parse(filepath).getroot()
+                try:
+                    xmlroot = ET.parse(filepath).getroot()
+                except ET.ParseError as err:
+                    print("ParseError occured in file :", filepath)
+                    print(err)
+                    raise
                 print_tags(xmlroot, 0, "prj", fh, None, 0, relfilepath)
 
                 fh.write(r"""</tt>