How to show traceback of "Unhandled error"?

Shiyao MA <[email protected]>
Newsgroups gmane.comp.python.twisted
Message-ID <CAJQX3Dy6zWGd2GZ7k2ZJyZTF-s+PpeEPbJuSrtNoG4px2GLnjQ@mail.gmail.com>
Hi,

Running the following script prints "Unhandled Error", but doesn't
contain the traceback of where the exception is raised.  In a massive
codebase, it's hard to locate where is the malfunctioning code is.


from twisted.internet.defer import Deferred

def raiseErr(what):
    raise Exception(what)

d = Deferred()
d.addCallback(raiseErr)
d.callback("asdf")

# how to show the traceback without manually adding an errback at the end?
# adding at the *end* of a deferred is hard as we don't know when the
client stops adding callbacks.




-- 
Best,
Shiyao

_______________________________________________
Twisted-Python mailing list
[email protected]
https://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.