startover / pythonfutures

Automatically exported from code.google.com/p/pythonfutures
Other
0 stars 0 forks source link

Traceback of Exceptions from parallel tasks is truncated #15

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I submit a job to the ThreadPoolExecutor. The job raises an exception which is 
reraised by future.result(), but the traceback starts at the future.result() 
call.

This does not happen in Python3 because tracebacks are attached to the 
exception.

The commits leading up to 
https://bitbucket.org/bluehorn/pythonfutures/changeset/31103a24718d43c23ab6dd5be
15bbb2a31e0ce2b fix this by storing sys.exc_info()[2] into the future.

Please consider merging my changes.

Original issue reported on code.google.com by t.landsc...@gmail.com on 28 Sep 2012 at 4:07

GoogleCodeExporter commented 9 years ago
I would also really like this feature.  We're patching our version of the 
library to support it.

I've attached a patch to apply against the current version of the code (based 
off 3.2.5).

Please consider adding this feature, and if not, explaining why.

Original comment by afog...@gmail.com on 9 Oct 2013 at 7:31

Attachments:

GoogleCodeExporter commented 9 years ago
Please indeed fix this issue, I can't debug my code in the handler method, 
because the exceptions are not raised correctly in Python 2.7 using 
concurrent.futures.

Original comment by webmaste...@gmail.com on 25 May 2014 at 1:21

GoogleCodeExporter commented 9 years ago
If you are interested here's also a workaround which not requires to patch the 
library:
http://stackoverflow.com/questions/19309514/how-to-get-correct-line-number-where
-exception-was-thrown-using-concurrent-futur/24457608#24457608

Original comment by loumarvi...@gmail.com on 9 Jul 2014 at 8:01