From efde146b0c42f2643f96d00896c99a90d501fb69 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Sat, 21 Mar 2015 15:04:43 +0100 Subject: Issue #23571: _Py_CheckFunctionResult() now gives the name of the function which returned an invalid result (result+error or no result without error) in the exception message. Add also unit test to check that the exception contains the name of the function. Special case: the final _PyEval_EvalFrameEx() check doesn't mention the function since it didn't execute a single function but a whole frame. --- Objects/methodobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Objects/methodobject.c') diff --git a/Objects/methodobject.c b/Objects/methodobject.c index 85b413f09a..b5467a4687 100644 --- a/Objects/methodobject.c +++ b/Objects/methodobject.c @@ -142,7 +142,7 @@ PyCFunction_Call(PyObject *func, PyObject *args, PyObject *kwds) } } - return _Py_CheckFunctionResult(res, "PyCFunction_Call"); + return _Py_CheckFunctionResult(func, res, NULL); } /* Methods (the standard built-in methods, that is) */ -- cgit v1.2.1