Replace Base::Exception with appropriate subclass

This commit is contained in:
wmayer
2018-11-14 19:28:00 +01:00
parent 56db19824e
commit 7acdb56d92
23 changed files with 116 additions and 115 deletions

View File

@@ -102,7 +102,7 @@ bool TaskDlgFeatureParameters::accept() {
// Make sure the feature is what we are expecting
// Should be fine but you never know...
if ( !feature->getTypeId().isDerivedFrom(PartDesign::Feature::getClassTypeId()) ) {
throw Base::Exception("Bad object processed in the feature dialog.");
throw Base::TypeError("Bad object processed in the feature dialog.");
}
App::DocumentObject* previous = static_cast<PartDesign::Feature*>(feature)->getBaseObject(/* silent = */ true );
@@ -115,7 +115,7 @@ bool TaskDlgFeatureParameters::accept() {
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.recompute()");
if (!feature->isValid()) {
throw Base::Exception(vp->getObject()->getStatusString());
throw Base::RuntimeError(vp->getObject()->getStatusString());
}
// detach the task panel from the selection to avoid to invoke