diff --git a/src/Mod/Sketcher/App/Sketch.cpp b/src/Mod/Sketcher/App/Sketch.cpp index 6c34c07e2f..aaff3c7087 100644 --- a/src/Mod/Sketcher/App/Sketch.cpp +++ b/src/Mod/Sketcher/App/Sketch.cpp @@ -1488,10 +1488,16 @@ int Sketch::addConstraint(const Constraint *constraint) int Sketch::addConstraints(const std::vector &ConstraintList) { int rtn = -1; + int cid = 0; - for (std::vector::const_iterator it = ConstraintList.begin();it!=ConstraintList.end();++it) + for (std::vector::const_iterator it = ConstraintList.begin();it!=ConstraintList.end();++it,++cid) { rtn = addConstraint (*it); + if(rtn == -1) { + Base::Console().Error("Sketcher constraint number %d is malformed!\n",cid); + } + } + return rtn; } @@ -1504,6 +1510,10 @@ int Sketch::addConstraints(const std::vector &ConstraintList, for (std::vector::const_iterator it = ConstraintList.begin();it!=ConstraintList.end();++it,++cid) { if (!unenforceableConstraints[cid] && (*it)->Type != Block) { rtn = addConstraint (*it); + + if(rtn == -1) { + Base::Console().Error("Sketcher constraint number %d is malformed!\n",cid); + } } else { ++ConstraintsCounter; // For correct solver redundant reporting