X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPipelineEditor%2FBaseQtMainWindow.cxx;h=e507f1926bb63128e7d013f61701eef4261344a3;hb=bebef39d45df113f3a706279a395eba44ce9472c;hp=cf5e41f32b07c686436283ff11e302be651892a2;hpb=a7142bafa94bd9f1d1fd9df4c11d5356676cf419;p=cpPlugins.git diff --git a/lib/cpPipelineEditor/BaseQtMainWindow.cxx b/lib/cpPipelineEditor/BaseQtMainWindow.cxx index cf5e41f..e507f19 100644 --- a/lib/cpPipelineEditor/BaseQtMainWindow.cxx +++ b/lib/cpPipelineEditor/BaseQtMainWindow.cxx @@ -319,14 +319,39 @@ void cpPipelineEditor::BaseQtMainWindow:: _ExecFilter( const std::string& filter_name ) { this->_Block( ); - std::string err = this->m_Workspace.Execute( filter_name ); - this->_UnBlock( ); - if( err != "" ) + try + { + this->m_Workspace.Execute( filter_name ); + this->_UnBlock( ); + } + catch( itk::ExceptionObject& err1 ) + { QMessageBox::critical( this, QMessageBox::tr( "Error executing filter" ), - QMessageBox::tr( err.c_str( ) ) + QMessageBox::tr( err1.GetDescription( ) ) ); + this->_UnBlock( ); + } + catch( std::exception& err2 ) + { + QMessageBox::critical( + this, + QMessageBox::tr( "Error executing filter" ), + QMessageBox::tr( err2.what( ) ) + ); + this->_UnBlock( ); + } + catch( ... ) + { + QMessageBox::critical( + this, + QMessageBox::tr( "Error executing filter" ), + QMessageBox::tr( "Unknown error" ) + ); + this->_UnBlock( ); + + } // yrt } // eof - $RCSfile$