Update of /cvsroot/pywin32/pywin32/com/win32com/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10585/com/win32com/src
Modified Files:
PyComHelpers.cpp
Log Message:
Include the name of the type that caused a ValueError getting a COM object
Index: PyComHelpers.cpp
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/src/PyComHelpers.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** PyComHelpers.cpp 23 Oct 2005 11:33:52 -0000 1.10
--- PyComHelpers.cpp 7 Feb 2007 03:45:05 -0000 1.11
***************
*** 252,256 ****
if ( !PyIBase::is_object(ob, &PyIUnknown::type) )
{
! PyErr_SetString(PyExc_ValueError, "argument is not a COM object");
return FALSE;
}
--- 252,258 ----
if ( !PyIBase::is_object(ob, &PyIUnknown::type) )
{
! PyErr_Format(PyExc_ValueError,
! "argument is not a COM object (got type=%s)",
! ob->ob_type->tp_name);
return FALSE;
}
|