Skip to content

Commit

Permalink
- don't raise string exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Unknown committed Jul 27, 2010
1 parent 67540f9 commit c37bf7e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions doc/CHANGES.rst
Expand Up @@ -11,6 +11,7 @@ http://docs.zope.org/zope2/releases/.
Bugs Fixed
++++++++++

- BasicUserFolder and SiteErrorLog: Don't raise string exceptions.

2.12.10 (2010-07-20)
--------------------
Expand Down
4 changes: 2 additions & 2 deletions src/AccessControl/User.py
Expand Up @@ -1003,10 +1003,10 @@ def __creatable_by_emergency_user__(self): return 1

def _setId(self, id):
if id != self.id:
raise MessageDialog(
raise ValueError(MessageDialog(
title='Invalid Id',
message='Cannot change the id of a UserFolder',
action ='./manage_main',)
action='./manage_main'))


# Domain authentication support. This is a good candidate to
Expand Down
4 changes: 2 additions & 2 deletions src/Products/SiteErrorLog/SiteErrorLog.py
Expand Up @@ -103,10 +103,10 @@ def manage_afterAdd(self, item, container):

def _setId(self, id):
if id != self.id:
raise MessageDialog(
raise ValueError(MessageDialog(
title='Invalid Id',
message='Cannot change the id of a SiteErrorLog',
action ='./manage_main',)
action='./manage_main'))

def _getLog(self):
"""Returns the log for this object.
Expand Down

0 comments on commit c37bf7e

Please sign in to comment.