[Zope3-checkins] CVS: Zope3/src/zope/publisher/interfaces - __init__.py:1.6

Steve Alexander steve@cat-box.net
Wed, 5 Feb 2003 06:38:34 -0500


Update of /cvs-repository/Zope3/src/zope/publisher/interfaces
In directory cvs.zope.org:/tmp/cvs-serv15880/src/zope/publisher/interfaces

Modified Files:
	__init__.py 
Log Message:
added interface for exception side-effects


=== Zope3/src/zope/publisher/interfaces/__init__.py 1.5 => 1.6 ===
--- Zope3/src/zope/publisher/interfaces/__init__.py:1.5	Wed Jan 15 10:32:20 2003
+++ Zope3/src/zope/publisher/interfaces/__init__.py	Wed Feb  5 06:38:32 2003
@@ -101,6 +101,20 @@
         return repr(self.orig_exc)
 
 
+class IExceptionSideEffects(Interface):
+    '''An exception caught by the publisher is adapted to this so that
+    it can have persistent side-effects.'''
+
+    def __call__(obj, request, exc_info):
+        '''Effect persistent side-effects.
+
+        Arguments are:
+          obj                 context-wrapped object that was published
+          request             the request
+          exc_info            the exception info being handled
+        '''
+
+
 class IPublishTraverse(Interface):
 
     def publishTraverse(request, name):