[Zope-Checkins] CVS: Zope3/lib/python/Zope/ComponentArchitecture - Exceptions.py:1.1.2.2

Jim Fulton jim@zope.com
Wed, 28 Nov 2001 16:14:38 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/ComponentArchitecture
In directory cvs.zope.org:/tmp/cvs-serv12498

Modified Files:
      Tag: Zope-3x-branch
	Exceptions.py 
Log Message:
Added exceptions to report contract violations when components are
misregistered. This has turned out to be much harder than expected.


=== Zope3/lib/python/Zope/ComponentArchitecture/Exceptions.py 1.1.2.1 => 1.1.2.2 ===
     "A component could not be found"
 
+class Invalid(Exception):
+    """A component doesn't satisfy a promise
+    """
+
+class Misused(Exception):
+    """A component is being used (registered) for the wrong interface
+    """