Skip to content

Commit d024d6a

Browse files
slightly improve rustdoc xml path error
1 parent 6232478 commit d024d6a

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

src/etc/htmldocck.py

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -346,15 +346,19 @@ def check_tree_attr(tree, path, attr, pat, regexp):
346346
def check_tree_text(tree, path, pat, regexp):
347347
path = normalize_xpath(path)
348348
ret = False
349-
for e in tree.findall(path):
350-
try:
351-
value = flatten(e)
352-
except KeyError:
353-
continue
354-
else:
355-
ret = check_string(value, pat, regexp)
356-
if ret:
357-
break
349+
try:
350+
for e in tree.findall(path):
351+
try:
352+
value = flatten(e)
353+
except KeyError:
354+
continue
355+
else:
356+
ret = check_string(value, pat, regexp)
357+
if ret:
358+
break
359+
except Exception as e:
360+
print('Failed to get path "{}"'.format(path))
361+
raise e
358362
return ret
359363

360364

0 commit comments

Comments
 (0)