[Checkins] SVN: Products.CMFCore/branches/2.2/Products/CMFCore/utils.py - don't raise string exceptions

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


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

Changed:
  U   Products.CMFCore/branches/2.2/Products/CMFCore/utils.py

-=-
Modified: Products.CMFCore/branches/2.2/Products/CMFCore/utils.py
===================================================================
--- Products.CMFCore/branches/2.2/Products/CMFCore/utils.py	2010-07-27 11:21:02 UTC (rev 115118)
+++ Products.CMFCore/branches/2.2/Products/CMFCore/utils.py	2010-07-27 11:54:56 UTC (rev 115119)
@@ -491,16 +491,17 @@
 
     """ Base class for objects which cannot be renamed.
     """
+
     def _setId(self, id):
-
         """ Never allow renaming!
         """
         if id != self.getId():
-            raise MessageDialog(
+            raise ValueError(MessageDialog(
                 title='Invalid Id',
                 message='Cannot change the id of this object',
-                action ='./manage_main',)
+                action='./manage_main'))
 
+
 class UniqueObject (ImmutableId):
 
     """ Base class for objects which cannot be "overridden" / shadowed.



More information about the checkins mailing list