use specialized exception classes

This commit is contained in:
wmayer
2017-04-28 18:49:11 +02:00
parent 0a32b91b6b
commit 1673ab801e
60 changed files with 675 additions and 349 deletions

View File

@@ -113,7 +113,7 @@ void PropertyQuantity::setPyObject(PyObject *value)
}
if (unit != _Unit)
throw Base::Exception("Not matching Unit!");
throw Base::UnitsMismatchError("Not matching Unit!");
PropertyFloat::setValue(quant.getValue());
}
@@ -178,7 +178,7 @@ void PropertyQuantityConstraint::setPyObject(PyObject *value)
}
if (unit != _Unit)
throw Base::Exception("Not matching Unit!");
throw Base::UnitsMismatchError("Not matching Unit!");
PropertyFloat::setValue(quant.getValue());
}