diff roundup/cgi/templating.py @ 2056:ba1d54edc53f

nicer invalid property error in HTML templating
author Richard Jones <richard@users.sourceforge.net>
date Fri, 27 Feb 2004 00:41:07 +0000
parents 5a5f66e6b0e1
children a94eacad51c8
line wrap: on
line diff
--- a/roundup/cgi/templating.py	Thu Feb 26 04:20:45 2004 +0000
+++ b/roundup/cgi/templating.py	Fri Feb 27 00:41:07 2004 +0000
@@ -376,7 +376,10 @@
             return None
 
         # get the property
-        prop = self._props[item]
+        try:
+            prop = self._props[item]
+        except KeyError:
+            raise KeyError, 'No such property "%s" on %s'%(item, self.classname)
 
         # look up the correct HTMLProperty class
         form = self._client.form

Roundup Issue Tracker: http://roundup-tracker.org/