Measure: Fix exception handling

If a Base::Exception is thrown in Measurement::getShape() then it's handled by the catch(...) handler and
converted into a Base::RuntimeError. This behaviour hides the original Base::Exception.

Example:
Selecting a datum plane raises the error 'Measurement: Unknown error retrieving shape' because the
original Base::ValueError isn't forwarded.
This commit is contained in:
wmayer
2024-06-01 17:45:12 +02:00
committed by wwmayer
parent a495280693
commit 17613bf929

View File

@@ -313,6 +313,10 @@ TopoDS_Shape Measurement::getShape(App::DocumentObject *obj , const char *subNam
}
return shape;
}
catch (const Base::Exception&) {
// re-throw original exception
throw;
}
catch (Standard_Failure& e) {
throw Base::CADKernelError(e.GetMessageString());
}