This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author doughellmann
Recipients doughellmann
Date 2013-08-18.23:07:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1376867279.76.0.423082412526.issue18776@psf.upfronthosting.co.za>
In-reply-to
Content
Under python 2 when an atexit callback raised an exception the full traceback was displayed. Under python 3, only the summary of the exception is shown.

Input file:

import atexit


def exit_with_exception(message):
    raise RuntimeError(message)

atexit.register(exit_with_exception, 'Registered first')
atexit.register(exit_with_exception, 'Registered second')


Python 2:

$ python2.7 source/atexit/atexit_exception.py
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "source/atexit/atexit_exception.py", line 36, in exit_with_exception
    raise RuntimeError(message)
RuntimeError: Registered second
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "source/atexit/atexit_exception.py", line 36, in exit_with_exception
    raise RuntimeError(message)
RuntimeError: Registered first
Error in sys.exitfunc:
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
    func(*targs, **kargs)
  File "source/atexit/atexit_exception.py", line 36, in exit_with_exception
    raise RuntimeError(message)
RuntimeError: Registered first

Python 3:

$ python3.3 source/atexit/atexit_exception.py
Error in atexit._run_exitfuncs:
RuntimeError: Registered second
Error in atexit._run_exitfuncs:
RuntimeError: Registered first
History
Date User Action Args
2013-08-18 23:07:59doughellmannsetrecipients: + doughellmann
2013-08-18 23:07:59doughellmannsetmessageid: <1376867279.76.0.423082412526.issue18776@psf.upfronthosting.co.za>
2013-08-18 23:07:59doughellmannlinkissue18776 messages
2013-08-18 23:07:59doughellmanncreate