[Zope-Checkins] SVN: Zope/branches/2.12/ - don't raise string exceptions

Yvo Schubbe y.2010 at wcm-solutions.de
Tue Jul 27 07:13:01 EDT 2010


Log message for revision 115116:
  - don't raise string exceptions

Changed:
  U   Zope/branches/2.12/doc/CHANGES.rst
  U   Zope/branches/2.12/src/AccessControl/User.py
  U   Zope/branches/2.12/src/Products/SiteErrorLog/SiteErrorLog.py

-=-
Modified: Zope/branches/2.12/doc/CHANGES.rst
===================================================================
--- Zope/branches/2.12/doc/CHANGES.rst	2010-07-27 06:20:09 UTC (rev 115115)
+++ Zope/branches/2.12/doc/CHANGES.rst	2010-07-27 11:13:00 UTC (rev 115116)
@@ -11,6 +11,7 @@
 Bugs Fixed
 ++++++++++
 
+- BasicUserFolder and SiteErrorLog: Don't raise string exceptions.
 
 2.12.10 (2010-07-20)
 --------------------

Modified: Zope/branches/2.12/src/AccessControl/User.py
===================================================================
--- Zope/branches/2.12/src/AccessControl/User.py	2010-07-27 06:20:09 UTC (rev 115115)
+++ Zope/branches/2.12/src/AccessControl/User.py	2010-07-27 11:13:00 UTC (rev 115116)
@@ -1003,10 +1003,10 @@
 
     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

Modified: Zope/branches/2.12/src/Products/SiteErrorLog/SiteErrorLog.py
===================================================================
--- Zope/branches/2.12/src/Products/SiteErrorLog/SiteErrorLog.py	2010-07-27 06:20:09 UTC (rev 115115)
+++ Zope/branches/2.12/src/Products/SiteErrorLog/SiteErrorLog.py	2010-07-27 11:13:00 UTC (rev 115116)
@@ -103,10 +103,10 @@
 
     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.



More information about the Zope-Checkins mailing list