chiark / gitweb /
documentation: add an actual diagnostic to this assert.
authorVladimír Vondruš <mosra@centrum.cz>
Wed, 21 Aug 2019 11:41:45 +0000 (13:41 +0200)
committerVladimír Vondruš <mosra@centrum.cz>
Wed, 21 Aug 2019 11:41:45 +0000 (13:41 +0200)
Seems to be hit quite often, so make it helpful.

documentation/doxygen.py

index b774e5bd5124eade2e7c42d8eb77699aab91ca7c..fcfb11676a177959e6130d802b3cd5a7f41ba746 100755 (executable)
@@ -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])&amp;&amp;([^\s])')