Convert OCC exceptions into Base::Runtime exceptions for App:DocumentObject handling

This commit is contained in:
Abdullah Tahiri
2017-04-25 13:24:21 +02:00
committed by wmayer
parent e3b47cac97
commit 0a32b91b6b

View File

@@ -137,10 +137,13 @@ App::DocumentObjectExecReturn *AttachExtension::extensionExecute()
if(this->isTouched_Mapping()) {
try{
positionBySupport();
// we let all Base::Exceptions thru, so that App:DocumentObject can take appropriate action
/*} catch (Base::Exception &e) {
return new App::DocumentObjectExecReturn(e.what());*/
// Convert OCC exceptions to Base::Exception
} catch (Standard_Failure &e){
return new App::DocumentObjectExecReturn(e.GetMessageString());
throw Base::RuntimeError(e.GetMessageString());
// return new App::DocumentObjectExecReturn(e.GetMessageString());
}
}
return App::DocumentObjectExtension::extensionExecute();