Inspection: catch exceptions in destructor
This commit is contained in:
committed by
Benjamin Nauck
parent
ccbbe3d708
commit
b6924ff744
@@ -111,13 +111,26 @@ ViewProviderInspection::ViewProviderInspection()
|
||||
|
||||
ViewProviderInspection::~ViewProviderInspection()
|
||||
{
|
||||
pcColorRoot->unref();
|
||||
pcCoords->unref();
|
||||
pcMatBinding->unref();
|
||||
pcColorMat->unref();
|
||||
deleteColorBar();
|
||||
pcLinkRoot->unref();
|
||||
pcPointStyle->unref();
|
||||
try {
|
||||
pcColorRoot->unref();
|
||||
pcCoords->unref();
|
||||
pcMatBinding->unref();
|
||||
pcColorMat->unref();
|
||||
pcLinkRoot->unref();
|
||||
pcPointStyle->unref();
|
||||
deleteColorBar();
|
||||
}
|
||||
catch (Base::Exception& e) {
|
||||
Base::Console().DestructorError(
|
||||
"ViewProviderInspection",
|
||||
"ViewProviderInspection::deleteColorBar() threw an exception: %s\n",
|
||||
e.what());
|
||||
}
|
||||
catch (...) {
|
||||
Base::Console().DestructorError(
|
||||
"ViewProviderInspection",
|
||||
"ViewProviderInspection destructor threw an unknown exception");
|
||||
}
|
||||
}
|
||||
|
||||
void ViewProviderInspection::onChanged(const App::Property* prop)
|
||||
|
||||
Reference in New Issue
Block a user