+ fix exception text in PropertyFileIncluded

This commit is contained in:
wmayer 2016-01-24 21:06:02 +01:00
parent 57fadb1663
commit a691fec1dd

View File

@ -287,7 +287,7 @@ void PropertyFileIncluded::setPyObject(PyObject *value)
fileStr = PyString_AsString(FileName);
}
else {
std::string error = std::string("First item in tuple must be a file or string");
std::string error = std::string("First item in tuple must be a file or string, not ");
error += value->ob_type->tp_name;
throw Base::TypeError(error);
}
@ -302,7 +302,7 @@ void PropertyFileIncluded::setPyObject(PyObject *value)
nameStr = PyString_AsString(FileName);
}
else {
std::string error = std::string("Second item in tuple must be a string");
std::string error = std::string("Second item in tuple must be a string, not ");
error += value->ob_type->tp_name;
throw Base::TypeError(error);
}
@ -311,7 +311,7 @@ void PropertyFileIncluded::setPyObject(PyObject *value)
return;
}
else {
std::string error = std::string("Type must be string or file");
std::string error = std::string("Type must be string or file, not ");
error += value->ob_type->tp_name;
throw Base::TypeError(error);
}