[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/ZopePublication - ZopePublication.py:1.9.10.2
Rakesh Naidu
rnaidu@zeomega.com
Wed, 23 Oct 2002 09:19:26 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/App/ZopePublication
In directory cvs.zope.org:/tmp/cvs-serv21585
Modified Files:
Tag: ErrorReportingService-branch
ZopePublication.py
Log Message:
Error services has been integrated
=== Zope3/lib/python/Zope/App/ZopePublication/ZopePublication.py 1.9.10.1 => 1.9.10.2 ===
--- Zope3/lib/python/Zope/App/ZopePublication/ZopePublication.py:1.9.10.1 Fri Oct 18 09:01:01 2002
+++ Zope3/lib/python/Zope/App/ZopePublication/ZopePublication.py Wed Oct 23 09:19:26 2002
@@ -15,7 +15,10 @@
from types import StringType, ClassType
from zLOG import LOG, ERROR, INFO
+from Zope.ComponentArchitecture import getService
+from Zope.ComponentArchitecture.Exceptions import ComponentLookupError
from ZODB.POSException import ConflictError
+from Zope.ComponentArchitecture import getService
from Zope.Publisher.DefaultPublication import DefaultPublication
from Zope.Publisher.mapply import mapply
@@ -47,6 +50,8 @@
# XXX Should this be imported here?
from Transaction import get_transaction
+from Zope.App.ComponentArchitecture.NextService import queryNextService
+
class RequestContainer:
# TODO: add security assertion declaring access to REQUEST
@@ -174,7 +179,6 @@
try:
# Abort the transaction.
get_transaction().abort()
-
# Delegate Unauthorized errors to the authentication service
# XXX Is this the right way to handle Unauthorized? We need
# to understand this better.
@@ -185,6 +189,11 @@
request.response.handleException(exc_info)
return
+ try:
+ errService = getService(object,'ErrorReportingService')
+ errService.raising(exc_info, request)
+ except ComponentLookupError:
+ pass
# XXX This is wrong. Should use getRequstView:
#