From 71c52e3048dd07567f0c690eab4e5d57be66f534 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Mon, 27 May 2019 08:57:14 +0200 Subject: 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(). --- Python/sysmodule.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Python/sysmodule.c') diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 5ebeacf0b7f..08a1a2995e0 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); } -- cgit v1.2.3