Martijn Pieters wrote:
Log message for revision 38178:
Massive style cleanup: Move to new raise exception style; for motivation, see:
Modified: Zope3/trunk/src/zope/app/workflow/stateful/definition.py
===================================================================
--- Zope3/trunk/src/zope/app/workflow/stateful/definition.py 2005-08-30
21:36:02 UTC (rev 38177)
+++ Zope3/trunk/src/zope/app/workflow/stateful/definition.py 2005-08-30
21:50:19 UTC (rev 38178)
@@ -46,6 +46,10 @@
implements(IStatefulStatesContainer)
+class NoLocalProcessDefinition(Exception):
+ """No local process definition found"""
+
+
class StateNamesVocabulary(SimpleVocabulary):
"""Vocabulary providing the names of states in a local process definition.
"""
@@ -61,7 +65,7 @@
for obj in zapi.getParents(context):
if IStatefulProcessDefinition.providedBy(obj):
return obj.getStateNames()
- raise 'NoLocalProcessDefinition', 'No local process definition found.'
+ raise NoLocalProcessDefinition('No local process definition found.')
I'm not sure it's worth worrying about (and I definitely prefer the new
version better), but these type conversions are not backward compatible.
Of course it's only a problem if anyone is trying to catch the
string version of the exception.
--
Benji York
Senior Software Engineer
Zope Corporation
_______________________________________________
Zope3-dev mailing list
[email protected]
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com