Message268814
If the exception argument is None or repr(None), it is omitted from the report when a thread raises an unhandled exception:
>>> def raise_exception(e):
... raise e
...
>>> t = Thread(target=raise_exception, args=(Exception(None),)); t.start(); t.join()
Exception in thread Thread-1:
Traceback (most recent call last):
File "/home/proj/python/cpython/Lib/threading.py", line 916, in _bootstrap_inner
self.run()
File "/home/proj/python/cpython/Lib/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "<stdin>", line 2, in raise_exception
Exception
>>> t = Thread(target=raise_exception, args=(Exception("None"),)); t.start(); t.join()
Exception in thread Thread-2:
Traceback (most recent call last):
File "/home/proj/python/cpython/Lib/threading.py", line 916, in _bootstrap_inner
self.run()
File "/home/proj/python/cpython/Lib/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "<stdin>", line 2, in raise_exception
Exception
Compare the result with other exception messages, the normal sys.excepthook() report, and Python 2:
>>> t = Thread(target=raise_exception, args=(Exception("NONE"),)); t.start(); t.join()
Exception in thread Thread-3:
Traceback (most recent call last):
File "/home/proj/python/cpython/Lib/threading.py", line 916, in _bootstrap_inner
self.run()
File "/home/proj/python/cpython/Lib/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "<stdin>", line 2, in raise_exception
Exception: NONE
>>> raise Exception(None)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
Exception: None |
|
Date |
User |
Action |
Args |
2016-06-18 14:57:36 | martin.panter | set | recipients:
+ martin.panter |
2016-06-18 14:57:36 | martin.panter | set | messageid: <1466261856.58.0.470780414166.issue27348@psf.upfronthosting.co.za> |
2016-06-18 14:57:36 | martin.panter | link | issue27348 messages |
2016-06-18 14:57:36 | martin.panter | create | |
|