git://git.onelab.eu
/
sfa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a06e9fb
)
log exceptions that occur inside of threads
author
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Thu, 7 Jul 2011 16:19:55 +0000
(12:19 -0400)
committer
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Thu, 7 Jul 2011 16:19:55 +0000
(12:19 -0400)
sfa/util/threadmanager.py
patch
|
blob
|
history
diff --git
a/sfa/util/threadmanager.py
b/sfa/util/threadmanager.py
index
331f847
..
4ce578f
100755
(executable)
--- a/
sfa/util/threadmanager.py
+++ b/
sfa/util/threadmanager.py
@@
-2,6
+2,7
@@
import threading
import traceback
import time
from Queue import Queue
import traceback
import time
from Queue import Queue
+from sfa.util.sfa.logging import logger
def ThreadedMethod(callable, results, errors):
"""
def ThreadedMethod(callable, results, errors):
"""
@@
-15,6
+16,7
@@
def ThreadedMethod(callable, results, errors):
try:
results.put(callable(*args, **kwds))
except Exception, e:
try:
results.put(callable(*args, **kwds))
except Exception, e:
+ logger.log_exc('ThreadManager: Error in thread: ')
errors.put(traceback.format_exc())
thread = ThreadInstance()
errors.put(traceback.format_exc())
thread = ThreadInstance()