Base: Quantity: return std::string

This commit is contained in:
Ladislav Michl
2024-07-13 13:07:27 +02:00
committed by Yorik van Havre
parent c11b37e312
commit 2ea8a633ac
58 changed files with 573 additions and 592 deletions

View File

@@ -765,8 +765,8 @@ PyObject* SketchObjectPy::setDatum(PyObject* args)
str << "Cannot set the datum because the sketch contains conflicting constraints";
}
else if (err == -2) {
str << "Datum " << (const char*)Quantity.getUserString().toUtf8()
<< " for the constraint with index " << Index << " is invalid";
str << "Datum " << Quantity.getUserString() << " for the constraint with index "
<< Index << " is invalid";
}
else if (err == -4) {
str << "Negative datum values are not valid for the constraint with index " << Index;
@@ -778,8 +778,7 @@ PyObject* SketchObjectPy::setDatum(PyObject* args)
str << "Cannot set the datum because of invalid geometry";
}
else {
str << "Unexpected problem at setting datum "
<< (const char*)Quantity.getUserString().toUtf8()
str << "Unexpected problem at setting datum " << Quantity.getUserString()
<< " for the constraint with index " << Index;
}
PyErr_SetString(PyExc_ValueError, str.str().c_str());