Sketcher: Command constraints error handling adaptation
======================================================= - Better handling for exceptions originating in Python addConstraint. - Refactor to reuse code for handling of exceptions
This commit is contained in:
committed by
abdullahtahiriyo
parent
17f65d8746
commit
bcedfae708
@@ -377,7 +377,11 @@ PyObject* SketchObjectPy::addConstraint(PyObject* args)
|
||||
|
||||
for (std::vector<Constraint*>::iterator it = values.begin(); it != values.end(); ++it) {
|
||||
if (!this->getSketchObjectPtr()->evaluateConstraint(*it)) {
|
||||
PyErr_SetString(PyExc_IndexError, "Constraint has invalid indexes");
|
||||
PyErr_SetString(
|
||||
PyExc_IndexError,
|
||||
QT_TRANSLATE_NOOP(
|
||||
"Notifications",
|
||||
"The constraint has invalid index information and is malformed."));
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user