nicer error message stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 19 May 2009 11:01:33 +0200
branchstable
changeset 1859 b068abd45a1c
parent 1858 69e41c88e195
child 1860 ce67132ced1c
nicer error message
rtags.py
--- a/rtags.py	Tue May 19 10:05:56 2009 +0200
+++ b/rtags.py	Tue May 19 11:01:33 2009 +0200
@@ -96,7 +96,9 @@
         #else:
         stype, rtype, otype, tagged = [str(k) for k in key]
         if self._allowed_values is not None:
-            assert tag in self._allowed_values, '%r is not an allowed tag' % tag
+            assert tag in self._allowed_values, \
+                   '%r is not an allowed tag (should be in %s)' % (
+                tag, self._allowed_values)
         self._tagdefs[(rtype, tagged, stype, otype)] = tag
 
     # rtag runtime api ########################################################