slightly improve rustdoc xml path error

This commit is contained in:
Guillaume Gomez 2018-05-28 21:29:02 +02:00
parent 6232478d26
commit d024d6a51e

View File

@ -346,6 +346,7 @@ def check_tree_attr(tree, path, attr, pat, regexp):
def check_tree_text(tree, path, pat, regexp):
path = normalize_xpath(path)
ret = False
try:
for e in tree.findall(path):
try:
value = flatten(e)
@ -355,6 +356,9 @@ def check_tree_text(tree, path, pat, regexp):
ret = check_string(value, pat, regexp)
if ret:
break
except Exception as e:
print('Failed to get path "{}"'.format(path))
raise e
return ret