From: Vladimír Vondruš Date: Wed, 21 Aug 2019 11:41:45 +0000 (+0200) Subject: documentation: add an actual diagnostic to this assert. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=ef63c515e3319a09a5539c7b7e2838a3adfd72bc;p=blog.git documentation: add an actual diagnostic to this assert. Seems to be hit quite often, so make it helpful. --- diff --git a/documentation/doxygen.py b/documentation/doxygen.py index b774e5bd..fcfb1167 100755 --- a/documentation/doxygen.py +++ b/documentation/doxygen.py @@ -244,7 +244,7 @@ def extract_id_hash(state: State, element: ET.Element) -> str: # comes from parse_id()[0]. See the # contents_anchor_in_both_group_and_namespace test for a verification. id = element.attrib['id'] - assert id.startswith(state.current_definition_url_base) + assert id.startswith(state.current_definition_url_base), "ID `%s` does not start with `%s`" % (id, state.current_definition_url_base) return id[len(state.current_definition_url_base)+2:] and_re_src = re.compile(r'([^\s])&&([^\s])')