Skip to content

Commit 044b20c

Browse files
author
Richard Jones
committed
present Reject exception messages to web users [SF#1237685]
1 parent 21d8ca0 commit 044b20c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Fixed:
3434
- refactored hyperdb.rawToHyperdb, allowing a number of improvements
3535
(thanks Ralf Schlatterbeck)
3636
- don't try to set a timeout for IMAPS (thanks Paul Jimenez)
37+
- present Reject exception messages to web users (sf bug 1237685)
3738

3839

3940
2005-05-02 0.8.3

roundup/cgi/client.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Id: client.py,v 1.214 2005-06-24 05:22:03 richard Exp $
1+
# $Id: client.py,v 1.215 2005-07-18 01:32:04 richard Exp $
22

33
"""WWW request handler (also used in the stand-alone server).
44
"""
@@ -737,6 +737,9 @@ def handle_action(self):
737737
738738
Actions may return a page (by default HTML) to return to the
739739
user, bypassing the usual template rendering.
740+
741+
We explicitly catch Reject and ValueError exceptions and
742+
present their messages to the user.
740743
'''
741744
if self.form.has_key(':action'):
742745
action = self.form[':action'].value.lower()
@@ -755,7 +758,7 @@ def handle_action(self):
755758
else:
756759
return action_klass(self).execute()
757760

758-
except ValueError, err:
761+
except (ValueError, Reject), err:
759762
self.error_message.append(str(err))
760763

761764
def get_action_class(self, action_name):

0 commit comments

Comments
 (0)