I am just involved in writing Twisted applications and therefore make many mistakes.
Suppose the code exists:
d = defer.Deferred()
d.addCallback(self.start_app)
d.callback(0)
def start_app(self, d):
return os.startfile(self.path)
def command_die(self, d):
print ('com_die', d)
We have a bug in os.startfile (self.path) and Big Traceback:
Unhandled error in Deferred:
Unhandled Error
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\twisted\internet\defer.py", line 542, in _runCallbacks
current.result = callback(current.result, *args, **kw)
File "C:/Dropbox/my_py/client3.py", line 100, in command_analiz
d.callback(i)
File "C:\Python27\lib\site-packages\twisted\internet\defer.py", line 361, in callback
self._startRunCallbacks(result)
File "C:\Python27\lib\site-packages\twisted\internet\defer.py", line 455, in _startRunCallbacks
self._runCallbacks()
File "C:\Python27\lib\site-packages\twisted\internet\defer.py", line 542, in _runCallbacks
current.result = callback(current.result, *args, **kw)
File "C:/Dropbox/my_py/client3.py", line 353, in start_eve_d
return os.startfile(self.path)
exceptions.NameError: global name 'os' is not defined
If I uncomment # d.addErrback (self.command_die)
We have a little "log" create by print ('com_die', d):
('com_die', <twisted.python.failure.Failure <type 'exceptions.NameError'>>)
Is there a way to get the full \ TraceBack log at design time?
At the moment, to understand where the new error was, addErrorback `s needs to be commented