if(dynamic_cast<ParaMEDMEM::MEDCouplingCMesh *>(mesh))
ret=SWIG_NewPointerObj((void*)mesh,SWIGTYPE_p_ParaMEDMEM__MEDCouplingCMesh,owner);
if(!ret)
- {
- const char msg[]="Not recognized type of mesh on downcast !";
- PyErr_SetString(PyExc_TypeError,msg);
- throw INTERP_KERNEL::Exception(msg);
- }
+ throw INTERP_KERNEL::Exception("Not recognized type of mesh on downcast !");
return ret;
}
else
{
delete [] tmp;
- const char msg[]="list must contain integers only";
- PyErr_SetString(PyExc_TypeError,msg);
- throw INTERP_KERNEL::Exception(msg);
+ throw INTERP_KERNEL::Exception("list must contain integers only");
}
}
return tmp;
else
{
delete [] tmp;
- const char msg[]="tuple must contain integers only";
- PyErr_SetString(PyExc_TypeError,msg);
- throw INTERP_KERNEL::Exception(msg);
+ throw INTERP_KERNEL::Exception("tuple must contain integers only");
}
}
return tmp;
else
{
#ifndef WITH_NUMPY2
- const char msg[]="convertPyToNewIntArr2 : not a list";
- PyErr_SetString(PyExc_TypeError,msg);
- throw INTERP_KERNEL::Exception(msg);
+ throw INTERP_KERNEL::Exception("convertPyToNewIntArr2 : not a list");
#else
if(PyArray_Check(pyLi))
{
}
else
{
- const char msg[]="convertPyToNewIntArr2 : not a list nor PyArray";
- PyErr_SetString(PyExc_TypeError,msg);
- throw INTERP_KERNEL::Exception(msg);
+ throw INTERP_KERNEL::Exception("convertPyToNewIntArr2 : not a list nor PyArray");
}
#endif
}
arr[i]=val;
}
else
- {
- const char msg[]="list must contain integers only";
- PyErr_SetString(PyExc_TypeError,msg);
- throw INTERP_KERNEL::Exception(msg);
- }
+ throw INTERP_KERNEL::Exception("list must contain integers only");
}
}
else if(PyTuple_Check(pyLi))
arr[i]=val;
}
else
- {
- const char msg[]="tuple must contain integers only";
- PyErr_SetString(PyExc_TypeError,msg);
- throw INTERP_KERNEL::Exception(msg);
- }
+ throw INTERP_KERNEL::Exception("tuple must contain integers only");
}
}
else
{
#ifndef WITH_NUMPY2
- const char msg[]="convertPyToNewIntArr3 : not a list nor a tuple";
- PyErr_SetString(PyExc_TypeError,msg);
- throw INTERP_KERNEL::Exception(msg);
+ throw INTERP_KERNEL::Exception("convertPyToNewIntArr3 : not a list nor a tuple");
#else
if(PyArray_Check(pyLi))
{
return ;
}
else
- {
- const char msg[]="convertPyToNewIntArr3 : not a list nor a tuple nor PyArray";
- PyErr_SetString(PyExc_TypeError,msg);
- throw INTERP_KERNEL::Exception(msg);
- }
+ throw INTERP_KERNEL::Exception("convertPyToNewIntArr3 : not a list nor a tuple nor PyArray");
#endif
}
}
arrToFill[i]=val;
}
else
- {
- const char msg[]="tuple must contain integers only";
- PyErr_SetString(PyExc_TypeError,msg);
- throw INTERP_KERNEL::Exception(msg);
- }
+ throw INTERP_KERNEL::Exception("tuple must contain integers only");
}
for(int i=size;i<sizeOfArray;i++)
arrToFill[i]=dftVal;
return;
}
else
- {
- const char msg[]="fillArrayWithPyListInt : not a list";
- PyErr_SetString(PyExc_TypeError,msg);
- throw INTERP_KERNEL::Exception(msg);
- }
+ throw INTERP_KERNEL::Exception("fillArrayWithPyListInt : not a list");
}
static PyObject *convertDblArrToPyList(const double *ptr, int size) throw(INTERP_KERNEL::Exception)
else
{
delete [] tmp;
- const char msg[]="convertPyToNewDblArr2 : list must contain floats/integers only";
- PyErr_SetString(PyExc_TypeError,msg);
- throw INTERP_KERNEL::Exception(msg);
+ throw INTERP_KERNEL::Exception("convertPyToNewDblArr2 : list must contain floats/integers only");
}
}
return tmp;
else
{
delete [] tmp;
- const char msg[]="convertPyToNewDblArr2 : tuple must contain floats/integers only";
- PyErr_SetString(PyExc_TypeError,msg);
- throw INTERP_KERNEL::Exception(msg);
+ throw INTERP_KERNEL::Exception("convertPyToNewDblArr2 : tuple must contain floats/integers only");
}
}
return tmp;
}
else
- {
- const char msg[]="convertPyToNewDblArr2 : not a list";
- PyErr_SetString(PyExc_TypeError,msg);
- throw INTERP_KERNEL::Exception(msg);
- }
+ throw INTERP_KERNEL::Exception("convertPyToNewDblArr2 : not a list");
}
static void fillArrayWithPyListDbl(PyObject *pyLi, double *arrToFill, int sizeOfArray, double dftVal, bool chckSize) throw(INTERP_KERNEL::Exception)
arrToFill[i]=val;
}
else
- {
- const char msg[]="fillArrayWithPyListDbl : list must contain floats/integers only";
- PyErr_SetString(PyExc_TypeError,msg);
- throw INTERP_KERNEL::Exception(msg);
- }
+ throw INTERP_KERNEL::Exception("fillArrayWithPyListDbl : list must contain floats/integers only");
}
for(int i=size;i<sizeOfArray;i++)
arrToFill[i]=dftVal;
arrToFill[i]=val;
}
else
- {
- const char msg[]="fillArrayWithPyListDbl : tuple must contain floats/integers only";
- PyErr_SetString(PyExc_TypeError,msg);
- throw INTERP_KERNEL::Exception(msg);
- }
+ throw INTERP_KERNEL::Exception("fillArrayWithPyListDbl : tuple must contain floats/integers only");
}
for(int i=size;i<sizeOfArray;i++)
arrToFill[i]=dftVal;
return ;
}
else
- {
- const char msg[]="convertPyToNewIntArr : not a list";
- PyErr_SetString(PyExc_TypeError,msg);
- throw INTERP_KERNEL::Exception(msg);
- }
+ throw INTERP_KERNEL::Exception("convertPyToNewIntArr : not a list");
}
void convertPyObjToVecUMeshesCst(PyObject *ms, std::vector<const ParaMEDMEM::MEDCouplingUMesh *>& v) throw(INTERP_KERNEL::Exception)
void *argp;
int status=SWIG_ConvertPtr(obj,&argp,SWIGTYPE_p_ParaMEDMEM__MEDCouplingUMesh,0|0);
if(!SWIG_IsOK(status))
- {
- const char msg[]="list must contain only instance of MEDCouplingUMesh";
- PyErr_SetString(PyExc_TypeError,msg);
- throw INTERP_KERNEL::Exception(msg);
- }
+ throw INTERP_KERNEL::Exception("list must contain only instance of MEDCouplingUMesh");
const ParaMEDMEM::MEDCouplingUMesh *arg=reinterpret_cast< const ParaMEDMEM::MEDCouplingUMesh * >(argp);
v[i]=arg;
}
}
else
- {
- const char msg[]="convertPyObjToVecUMeshesCst : not a list";
- PyErr_SetString(PyExc_TypeError,msg);
- throw INTERP_KERNEL::Exception(msg);
- }
+ throw INTERP_KERNEL::Exception("convertPyObjToVecUMeshesCst : not a list");
}
void convertPyObjToVecUMeshes(PyObject *ms, std::vector<ParaMEDMEM::MEDCouplingUMesh *>& v) throw(INTERP_KERNEL::Exception)
void *argp;
int status=SWIG_ConvertPtr(obj,&argp,SWIGTYPE_p_ParaMEDMEM__MEDCouplingUMesh,0|0);
if(!SWIG_IsOK(status))
- {
- const char msg[]="list must contain only instance of MEDCouplingUMesh";
- PyErr_SetString(PyExc_TypeError,msg);
- throw INTERP_KERNEL::Exception(msg);
- }
+ throw INTERP_KERNEL::Exception("list must contain only instance of MEDCouplingUMesh");
ParaMEDMEM::MEDCouplingUMesh *arg=reinterpret_cast< ParaMEDMEM::MEDCouplingUMesh * >(argp);
v[i]=arg;
}
}
else
- {
- const char msg[]="convertPyObjToVecUMeshes : not a list";
- PyErr_SetString(PyExc_TypeError,msg);
- throw INTERP_KERNEL::Exception(msg);
- }
+ throw INTERP_KERNEL::Exception("convertPyObjToVecUMeshes : not a list");
}
void convertPyObjToVecMeshesCst(PyObject *ms, std::vector<const ParaMEDMEM::MEDCouplingMesh *>& v) throw(INTERP_KERNEL::Exception)
void *argp;
int status=SWIG_ConvertPtr(obj,&argp,SWIGTYPE_p_ParaMEDMEM__MEDCouplingMesh,0|0);
if(!SWIG_IsOK(status))
- {
- const char msg[]="list must contain only instance of MEDCouplingMesh";
- PyErr_SetString(PyExc_TypeError,msg);
- throw INTERP_KERNEL::Exception(msg);
- }
+ throw INTERP_KERNEL::Exception("list must contain only instance of MEDCouplingMesh");
const ParaMEDMEM::MEDCouplingMesh *arg=reinterpret_cast< const ParaMEDMEM::MEDCouplingMesh * >(argp);
v[i]=arg;
}
}
else
- {
- const char msg[]="convertPyObjToVecUMeshesCst : not a list";
- PyErr_SetString(PyExc_TypeError,msg);
- throw INTERP_KERNEL::Exception(msg);
- }
+ throw INTERP_KERNEL::Exception("convertPyObjToVecUMeshesCst : not a list");
}
void convertPyObjToVecDataArrayDblCst(PyObject *ms, std::vector<const ParaMEDMEM::DataArrayDouble *>& v) throw(INTERP_KERNEL::Exception)
void *argp;
int status=SWIG_ConvertPtr(obj,&argp,SWIGTYPE_p_ParaMEDMEM__DataArrayDouble,0|0);
if(!SWIG_IsOK(status))
- {
- const char msg[]="list must contain only DataArrayDouble";
- PyErr_SetString(PyExc_TypeError,msg);
- throw INTERP_KERNEL::Exception(msg);
- }
+ throw INTERP_KERNEL::Exception("list must contain only DataArrayDouble");
const ParaMEDMEM::DataArrayDouble *arg=reinterpret_cast< const ParaMEDMEM::DataArrayDouble * >(argp);
v[i]=arg;
}
}
else
- {
- const char msg[]="convertPyObjToVecDataArrayDblCst : not a list";
- PyErr_SetString(PyExc_TypeError,msg);
- throw INTERP_KERNEL::Exception(msg);
- }
+ throw INTERP_KERNEL::Exception("convertPyObjToVecDataArrayDblCst : not a list");
}
void convertPyObjToVecFieldDblCst(PyObject *ms, std::vector<const ParaMEDMEM::MEDCouplingFieldDouble *>& v) throw(INTERP_KERNEL::Exception)
void *argp;
int status=SWIG_ConvertPtr(obj,&argp,SWIGTYPE_p_ParaMEDMEM__MEDCouplingFieldDouble,0|0);
if(!SWIG_IsOK(status))
- {
- const char msg[]="list must contain only instance of MEDCouplingFieldDouble";
- PyErr_SetString(PyExc_TypeError,msg);
- throw INTERP_KERNEL::Exception(msg);
- }
+ throw INTERP_KERNEL::Exception("list must contain only instance of MEDCouplingFieldDouble");
const ParaMEDMEM::MEDCouplingFieldDouble *arg=reinterpret_cast< const ParaMEDMEM::MEDCouplingFieldDouble * >(argp);
v[i]=arg;
}
}
else
- {
- const char msg[]="convertPyObjToVecFieldDblCst : not a list";
- PyErr_SetString(PyExc_TypeError,msg);
- throw INTERP_KERNEL::Exception(msg);
- }
+ throw INTERP_KERNEL::Exception("convertPyObjToVecFieldDblCst : not a list");
}
void convertPyObjToVecDataArrayIntCst(PyObject *ms, std::vector<const ParaMEDMEM::DataArrayInt *>& v) throw(INTERP_KERNEL::Exception)
void *argp;
int status=SWIG_ConvertPtr(obj,&argp,SWIGTYPE_p_ParaMEDMEM__DataArrayInt,0|0);
if(!SWIG_IsOK(status))
- {
- const char msg[]="list must contain only instance of DataArrayInt";
- PyErr_SetString(PyExc_TypeError,msg);
- throw INTERP_KERNEL::Exception(msg);
- }
+ throw INTERP_KERNEL::Exception("list must contain only instance of DataArrayInt");
ParaMEDMEM::DataArrayInt *arg=reinterpret_cast< ParaMEDMEM::DataArrayInt * >(argp);
v[i]=arg;
}
}
else
- {
- const char msg[]="convertPyObjToVecDataArrayInt : not a list";
- PyErr_SetString(PyExc_TypeError,msg);
- throw INTERP_KERNEL::Exception(msg);
- }
+ throw INTERP_KERNEL::Exception("convertPyObjToVecDataArrayInt : not a list");
}
/*!