[CalendarServer-changes] [6107] CalendarServer/trunk/twistedcaldav/method/put_addressbook_common.py
source_changes at macosforge.org
source_changes at macosforge.org
Wed Aug 18 10:53:17 PDT 2010
Revision: 6107
http://trac.macosforge.org/projects/calendarserver/changeset/6107
Author: glyph at apple.com
Date: 2010-08-18 10:53:16 -0700 (Wed, 18 Aug 2010)
Log Message:
-----------
Show me the underlying error, like put_common.py does.
Modified Paths:
--------------
CalendarServer/trunk/twistedcaldav/method/put_addressbook_common.py
Modified: CalendarServer/trunk/twistedcaldav/method/put_addressbook_common.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/method/put_addressbook_common.py 2010-08-18 17:20:36 UTC (rev 6106)
+++ CalendarServer/trunk/twistedcaldav/method/put_addressbook_common.py 2010-08-18 17:53:16 UTC (rev 6107)
@@ -23,6 +23,8 @@
import types
from twisted.internet import reactor
+from twisted.python.failure import Failure
+
from twisted.internet.defer import Deferred, inlineCallbacks, succeed
from twisted.internet.defer import returnValue
from twext.web2 import responsecode
@@ -471,10 +473,20 @@
returnValue(response)
except Exception, err:
+ # Preserve the real traceback to display later, since the error-
+ # handling here yields out of the generator and thereby shreds the
+ # stack.
+ f = Failure()
if reservation:
yield reservation.unreserve()
# FIXME: transaction needs to be rolled back.
+ # Display the traceback. Unfortunately this will usually be
+ # duplicated by the higher-level exception handler that captures
+ # the thing that raises here, but it's better than losing the
+ # information.
+ f.printTraceback()
+
raise err
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100818/1339fdc6/attachment.html>
More information about the calendarserver-changes
mailing list