Make doxygen assertion more helpful
authorMark Abraham <mark.j.abraham@gmail.com>
Fri, 11 Jun 2021 12:25:41 +0000 (14:25 +0200)
committerArtem Zhmurov <zhmurov@gmail.com>
Wed, 16 Jun 2021 13:26:56 +0000 (13:26 +0000)
Knowing the name of the clashing symbol helps understand where the
problem lies.

docs/doxygen/doxygenxml.py

index 2d72eee2fa1dcfd868f6288f9ab470873804593d..7d8af742de7d7d2b5a0d71ceb4eadf99b3c467e2 100755 (executable)
@@ -2,7 +2,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2014,2015,2016,2018,2019,2020, by the GROMACS development team, led by
+# Copyright (c) 2014,2015,2016,2018,2019,2020,2021, by the GROMACS development team, led by
 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
 # and including many others, as listed in the AUTHORS file in the
 # top-level source directory and at http://www.gromacs.org.
@@ -400,10 +400,10 @@ class Member(Entity):
         """Add a compound that contains this member."""
         self._parents.add(compound)
         if isinstance(compound, Class):
-            assert self._class is None, 'Class \"{0}\" was already added. Maybe you have two entities with the same name.'.format(self._class)
+            assert self._class is None, 'Class \"{0}\" was already added. Maybe you have two entities with the same name {1}'.format(self._class, self._name)
             self._class = compound
         elif isinstance(compound, Namespace):
-            assert self._namespace is None, 'Namespace \"{0}\" was already added. Maybe you have two entities with the same name.'.format(self._namespace)
+            assert self._namespace is None, 'Namespace \"{0}\" was already added. Maybe you have two entities with the same name {1}'.format(self._namespace, self._name)
             self._namespace = compound
         elif isinstance(compound, File):
             self._files.add(compound)