Commit b0e6a353 authored by Marc Vaisset's avatar Marc Vaisset
Browse files

Set error message in function w_plug when arguments are of wrong types.

parent 191491b3
......@@ -56,10 +56,18 @@ namespace dynamicgraph {
if (!PyArg_ParseTuple(args,"OO", &objOut, &objIn))
return NULL;
if (!PyCObject_Check(objOut))
if (!PyCObject_Check(objOut)) {
PyErr_SetString(PyExc_TypeError,
"first argument should be a pointer to"
" signalBase<int>.");
return NULL;
if (!PyCObject_Check(objIn))
}
if (!PyCObject_Check(objIn)) {
PyErr_SetString(PyExc_TypeError,
"second argument should be a pointer to"
" signalBase<int>.");
return NULL;
}
pObjIn = PyCObject_AsVoidPtr(objIn);
SignalBase<int>* signalIn = (SignalBase<int>*)pObjIn;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment