Fem: catch exceptions in destructor
This commit is contained in:
committed by
Benjamin Nauck
parent
67982f3963
commit
ccbbe3d708
@@ -261,27 +261,40 @@ ViewProviderFemPostObject::ViewProviderFemPostObject()
|
||||
|
||||
ViewProviderFemPostObject::~ViewProviderFemPostObject()
|
||||
{
|
||||
FemPostObjectSelectionObserver::instance().unregisterFemPostObject(this);
|
||||
m_transpType->unref();
|
||||
m_depthBuffer->unref();
|
||||
m_shapeHints->unref();
|
||||
m_coordinates->unref();
|
||||
m_materialBinding->unref();
|
||||
m_drawStyle->unref();
|
||||
m_normalBinding->unref();
|
||||
m_normals->unref();
|
||||
m_faces->unref();
|
||||
m_triangleStrips->unref();
|
||||
m_markers->unref();
|
||||
m_lines->unref();
|
||||
m_sepMarkerLine->unref();
|
||||
m_separator->unref();
|
||||
m_material->unref();
|
||||
m_matPlainEdges->unref();
|
||||
m_switchMatEdges->unref();
|
||||
deleteColorBar();
|
||||
m_colorStyle->unref();
|
||||
m_colorRoot->unref();
|
||||
try {
|
||||
FemPostObjectSelectionObserver::instance().unregisterFemPostObject(this);
|
||||
m_transpType->unref();
|
||||
m_depthBuffer->unref();
|
||||
m_shapeHints->unref();
|
||||
m_coordinates->unref();
|
||||
m_materialBinding->unref();
|
||||
m_drawStyle->unref();
|
||||
m_normalBinding->unref();
|
||||
m_normals->unref();
|
||||
m_faces->unref();
|
||||
m_triangleStrips->unref();
|
||||
m_markers->unref();
|
||||
m_lines->unref();
|
||||
m_sepMarkerLine->unref();
|
||||
m_separator->unref();
|
||||
m_material->unref();
|
||||
m_matPlainEdges->unref();
|
||||
m_switchMatEdges->unref();
|
||||
m_colorStyle->unref();
|
||||
m_colorRoot->unref();
|
||||
deleteColorBar();
|
||||
}
|
||||
catch (Base::Exception& e) {
|
||||
Base::Console().DestructorError(
|
||||
"ViewProviderFemPostObject",
|
||||
"ViewProviderFemPostObject destructor threw an exception: %s\n",
|
||||
e.what());
|
||||
}
|
||||
catch (...) {
|
||||
Base::Console().DestructorError(
|
||||
"ViewProviderFemPostObject",
|
||||
"ViewProviderFemPostObject destructor threw an unknown exception");
|
||||
}
|
||||
}
|
||||
|
||||
void ViewProviderFemPostObject::deleteColorBar()
|
||||
|
||||
Reference in New Issue
Block a user