Mercurial > p > roundup > code
diff roundup/cgi/client.py @ 3388:0c66acaea802
present Reject exception messages to web users [SF#1237685]
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Mon, 18 Jul 2005 01:32:04 +0000 |
| parents | 2913b42c0810 |
| children | 8c113ca4a5fb |
line wrap: on
line diff
--- a/roundup/cgi/client.py Mon Jul 18 01:19:57 2005 +0000 +++ b/roundup/cgi/client.py Mon Jul 18 01:32:04 2005 +0000 @@ -1,4 +1,4 @@ -# $Id: client.py,v 1.214 2005-06-24 05:22:03 richard Exp $ +# $Id: client.py,v 1.215 2005-07-18 01:32:04 richard Exp $ """WWW request handler (also used in the stand-alone server). """ @@ -737,6 +737,9 @@ Actions may return a page (by default HTML) to return to the user, bypassing the usual template rendering. + + We explicitly catch Reject and ValueError exceptions and + present their messages to the user. ''' if self.form.has_key(':action'): action = self.form[':action'].value.lower() @@ -755,7 +758,7 @@ else: return action_klass(self).execute() - except ValueError, err: + except (ValueError, Reject), err: self.error_message.append(str(err)) def get_action_class(self, action_name):
