- //Hiding the last CartoSettingsPanel
- this->m_ButtonPanel->Show( false );
- //Finding the CartoSettingsPanel of the ButtonClicket
- this->m_ButtonPanel = this->m_ButtonContainerSettings->GetPanelButton(
- buttonName );
- //CartoSettingsPanel Management
- this->m_AuiManager->GetPane( _T("ButtonPanel") ).window
- = this->m_ButtonPanel;
- //Updating the manager
- this->m_AuiManager->Update( );
+ try
+ {
+ //Hiding the last CartoSettingsPanel
+ this->m_ButtonPanel->Show( false );
+ //Finding the CartoSettingsPanel of the ButtonClicket
+ this->m_ButtonPanel = this->m_ButtonContainerSettings->GetPanelButton(
+ buttonName );
+ //CartoSettingsPanel Management
+ this->m_AuiManager->GetPane( _T("ButtonPanel") ).window
+ = this->m_ButtonPanel;
+ //Updating the manager
+ this->m_AuiManager->Update( );
+ }//yrt
+ catch ( const std::exception& e )
+ {
+ std::cerr
+ << "PanelButtonContainer::UpdatePanel( const std::string &buttonName )"
+ << "exception: " << e.what( ) << std::endl;
+ std::cout<<"Maybe the panel of the button is NULL"<<std::endl;
+ exit(1);
+ }//hctac