From 24159a59a3b404346e7931ef8817d09eeeb0711f Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 22 Aug 2010 14:49:10 +1000 Subject: pidl: give the varible name for bad type in python calls This makes it much clearer which argument to a function had the wrong type --- source4/librpc/rpc/pyrpc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4') diff --git a/source4/librpc/rpc/pyrpc.h b/source4/librpc/rpc/pyrpc.h index f49122a0ae..4ba9bd3e1f 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", (type)->tp_name); \ + PyErr_Format(PyExc_TypeError, "Expected type %s for %s", (type)->tp_name, #var); \ fail; \ } -- cgit