diff options
author | Victor Stinner <vstinner@redhat.com> | 2019-05-27 08:57:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-27 08:57:14 +0200 |
commit | 71c52e3048dd07567f0c690eab4e5d57be66f534 (patch) | |
tree | 7f3a063d2d3edb324d7d00bf13a66ddad689d22e /Python/sysmodule.c | |
parent | 2f0bfd27a5e3a9a7cbeb2ddd45ce50c3d4bdb4e9 (diff) | |
download | cpython-git-71c52e3048dd07567f0c690eab4e5d57be66f534.tar.gz |
bpo-36829: Add _PyErr_WriteUnraisableMsg() (GH-13488)
* sys.unraisablehook: add 'err_msg' field to UnraisableHookArgs.
* Use _PyErr_WriteUnraisableMsg() in _ctypes _DictRemover_call()
and gc delete_garbage().
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r-- | Python/sysmodule.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 5ebeacf0b7..08a1a2995e 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -689,14 +689,15 @@ Handle an unraisable exception. The unraisable argument has the following attributes: * exc_type: Exception type. -* exc_value: Exception value. -* exc_tb: Exception traceback, can be None. -* obj: Object causing the exception, can be None. +* exc_value: Exception value, can be None. +* exc_traceback: Exception traceback, can be None. +* err_msg: Error message, can be None. +* object: Object causing the exception, can be None. [clinic start generated code]*/ static PyObject * sys_unraisablehook(PyObject *module, PyObject *unraisable) -/*[clinic end generated code: output=bb92838b32abaa14 input=fdbdb47fdd0bee06]*/ +/*[clinic end generated code: output=bb92838b32abaa14 input=ec3af148294af8d3]*/ { return _PyErr_WriteUnraisableDefaultHook(unraisable); } |