slightly improve rustdoc xml path error
This commit is contained in:
parent
6232478d26
commit
d024d6a51e
1 changed files with 13 additions and 9 deletions
|
@ -346,6 +346,7 @@ def check_tree_attr(tree, path, attr, pat, regexp):
|
||||||
def check_tree_text(tree, path, pat, regexp):
|
def check_tree_text(tree, path, pat, regexp):
|
||||||
path = normalize_xpath(path)
|
path = normalize_xpath(path)
|
||||||
ret = False
|
ret = False
|
||||||
|
try:
|
||||||
for e in tree.findall(path):
|
for e in tree.findall(path):
|
||||||
try:
|
try:
|
||||||
value = flatten(e)
|
value = flatten(e)
|
||||||
|
@ -355,6 +356,9 @@ def check_tree_text(tree, path, pat, regexp):
|
||||||
ret = check_string(value, pat, regexp)
|
ret = check_string(value, pat, regexp)
|
||||||
if ret:
|
if ret:
|
||||||
break
|
break
|
||||||
|
except Exception as e:
|
||||||
|
print('Failed to get path "{}"'.format(path))
|
||||||
|
raise e
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue