[Zope3-checkins] CVS: Zope3/src/zope/interface - __init__.py:1.11 exceptions.py:1.3

Jim Fulton cvs-admin at zope.org
Mon Dec 1 11:19:31 EST 2003


Update of /cvs-repository/Zope3/src/zope/interface
In directory cvs.zope.org:/tmp/cvs-serv11310/src/zope/interface

Modified Files:
	__init__.py exceptions.py 
Log Message:
Added a new Invalid exception as the basis for a number of expressions
relating to objects that don't meet specifications.


=== Zope3/src/zope/interface/__init__.py 1.10 => 1.11 ===
--- Zope3/src/zope/interface/__init__.py:1.10	Fri Nov 21 12:11:43 2003
+++ Zope3/src/zope/interface/__init__.py	Mon Dec  1 11:19:30 2003
@@ -84,6 +84,7 @@
 from zope.interface.declarations import implements, implementsOnly
 from zope.interface.declarations import classProvides, moduleProvides
 from zope.interface.declarations import Declaration
+from zope.interface.exceptions import Invalid
 
 # The following are to make spec pickles cleaner
 from zope.interface.declarations import Provides


=== Zope3/src/zope/interface/exceptions.py 1.2 => 1.3 ===
--- Zope3/src/zope/interface/exceptions.py:1.2	Wed Dec 25 09:13:42 2002
+++ Zope3/src/zope/interface/exceptions.py	Mon Dec  1 11:19:30 2003
@@ -16,7 +16,11 @@
 $Id$
 """
 
-class DoesNotImplement(Exception):
+class Invalid(Exception):
+    """An specification is violated
+    """
+
+class DoesNotImplement(Invalid):
     """ This object does not implement """
     def __init__(self, interface):
         self.interface = interface
@@ -26,7 +30,7 @@
 
         """ % self.__dict__
 
-class BrokenImplementation(Exception):
+class BrokenImplementation(Invalid):
     """An attribute is not completely implemented.
     """
 
@@ -40,7 +44,7 @@
         The %(name)s attribute was not provided.
         """ % self.__dict__
 
-class BrokenMethodImplementation(Exception):
+class BrokenMethodImplementation(Invalid):
     """An method is not completely implemented.
     """
 




More information about the Zope3-Checkins mailing list