From: ageay Date: Mon, 8 Jul 2013 15:34:12 +0000 (+0000) Subject: Improve message. X-Git-Tag: V7_3_1b1~358 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b37cc5cfb1d5659c4bc4d1b622c6ed1cd2457f97;p=tools%2Fmedcoupling.git Improve message. --- diff --git a/src/MEDCoupling_Swig/MEDCouplingTypemaps.i b/src/MEDCoupling_Swig/MEDCouplingTypemaps.i index ace73d104..b0d4e26cc 100644 --- a/src/MEDCoupling_Swig/MEDCouplingTypemaps.i +++ b/src/MEDCoupling_Swig/MEDCouplingTypemaps.i @@ -1125,7 +1125,10 @@ static void convertFromPyObjVectorOfObj(PyObject *pyLi, swig_type_info *ty, cons PyObject *obj=PyList_GetItem(pyLi,i); int status=SWIG_ConvertPtr(obj,&argp,ty,0|0); if(!SWIG_IsOK(status)) - throw INTERP_KERNEL::Exception("list must contain only MEDCouplingUMesh"); + { + std::ostringstream oss; oss << "convertFromPyObjVectorOfObj : list is excepted to contain only " << typeStr << " instances !"; + throw INTERP_KERNEL::Exception(oss.str().c_str()); + } T arg=reinterpret_cast< T >(argp); ret[i]=arg; } @@ -1140,7 +1143,7 @@ static void convertFromPyObjVectorOfObj(PyObject *pyLi, swig_type_info *ty, cons int status=SWIG_ConvertPtr(obj,&argp,ty,0|0); if(!SWIG_IsOK(status)) { - std::ostringstream oss; oss << "tuple must contain only " << typeStr; + std::ostringstream oss; oss << "convertFromPyObjVectorOfObj : tuple is excepted to contain only " << typeStr << " instances !"; throw INTERP_KERNEL::Exception(oss.str().c_str()); } T arg=reinterpret_cast< T >(argp);