From 0a32b91b6b0633d645ffb181d25316c6b747cb89 Mon Sep 17 00:00:00 2001 From: Abdullah Tahiri Date: Tue, 25 Apr 2017 13:24:21 +0200 Subject: [PATCH] Convert OCC exceptions into Base::Runtime exceptions for App:DocumentObject handling --- src/Mod/Part/App/AttachExtension.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Mod/Part/App/AttachExtension.cpp b/src/Mod/Part/App/AttachExtension.cpp index 9ea8bb65e1..96106864a4 100644 --- a/src/Mod/Part/App/AttachExtension.cpp +++ b/src/Mod/Part/App/AttachExtension.cpp @@ -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();