[issue7317] Display full tracebacks when an error occurs asynchronously
alon horev
report at bugs.python.org
Sat Oct 15 13:05:44 CEST 2011
alon horev <alonho at gmail.com> added the comment:
Submitting a patch proposing this format:
-----BEGIN UNRAISABLE EXCEPTION-----
Class: AttributeError
Instance: "'NoneType' object has no attribute 'someattr'"
Function: <bound method A.__del__ of <__main__.A object at 0x1007671d0>>
Traceback (most recent call last):
File "/tmp/bla.py", line 4, in __del__
None.someattr
-----END UNRAISABLE EXCEPTION-----
I've wrapped the exception information with header/footer differentiating it from a user's error handling code that also prints tracebacks (is it too much?).
I've considered using the warnings module, But I dislike the suppression of already warned messages. (2 instances will raise exception in __del__ but only one message will be printed)
This is my first patch submission so feel free giving me a hard time.
----------
keywords: +patch
nosy: +alonho
Added file: http://bugs.python.org/file23413/7317.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7317>
_______________________________________
More information about the Python-bugs-list
mailing list