Improved SketchObject error reporting

This commit is contained in:
jrheinlaender
2013-09-12 16:18:08 +02:00
committed by Stefan Tröger
parent 5a0ac01640
commit 99e68a2a75
3 changed files with 7 additions and 0 deletions

View File

@@ -540,6 +540,8 @@ PyObject* SketchObjectPy::setDatum(PyObject *args)
str << "Negative datum values are not valid for the constraint with index " << Index;
else if (err == -5)
str << "Zero is not a valid datum for the constraint with index " << Index;
else if (err == -6)
str << "Cannot set the datum because of invalid geometry";
else
str << "Unexpected problem at setting datum " << (const char*)Quantity.getUserString().toUtf8() << " for the constraint with index " << Index;
PyErr_SetString(PyExc_ValueError, str.str().c_str());