From c79861a14e671ea037f550dbf5c2ae9e84fb3803 Mon Sep 17 00:00:00 2001 From: Kamen Mazdrashki Date: Thu, 16 Sep 2010 02:17:34 +0300 Subject: [PATCH] s4-pyrpc: Print location and type name we got when checking for types --- source4/librpc/rpc/pyrpc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source4/librpc/rpc/pyrpc.h b/source4/librpc/rpc/pyrpc.h index 651f8f11f5e..c3bc83877cc 100644 --- a/source4/librpc/rpc/pyrpc.h +++ b/source4/librpc/rpc/pyrpc.h @@ -24,7 +24,7 @@ #define PY_CHECK_TYPE(type, var, fail) \ if (!PyObject_TypeCheck(var, type)) {\ - PyErr_Format(PyExc_TypeError, "Expected type %s for %s", (type)->tp_name, #var); \ + PyErr_Format(PyExc_TypeError, __location__ ": Expected type '%s' for '%s' of type '%s'", (type)->tp_name, #var, Py_TYPE(var)->tp_name); \ fail; \ } -- 2.11.4.GIT