]> SALOME platform Git repositories - modules/med.git/commitdiff
Salome HOME
Improve message.
authorageay <ageay>
Mon, 8 Jul 2013 15:34:12 +0000 (15:34 +0000)
committerageay <ageay>
Mon, 8 Jul 2013 15:34:12 +0000 (15:34 +0000)
src/MEDCoupling_Swig/MEDCouplingTypemaps.i

index ace73d10434af40a1d500c2a84755712ce3f5cec..b0d4e26cc93de588af63583ae337fde1cf46a97e 100644 (file)
@@ -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);