Coverity report fix: handle an exception potentially thrown by CONTEXT_MENU::runOnSubmenus.

This commit is contained in:
Maciej Suminski 2015-08-15 16:00:33 +02:00
parent 5486104e8d
commit a09d6431e4
1 changed files with 8 additions and 1 deletions

View File

@ -311,9 +311,16 @@ void CONTEXT_MENU::runEventHandlers( const wxMenuEvent& aMenuEvent, OPT_TOOL_EVE
void CONTEXT_MENU::runOnSubmenus( boost::function<void(CONTEXT_MENU*)> aFunction )
{
try
{
std::for_each( m_submenus.begin(), m_submenus.end(), aFunction );
}
catch( std::exception& e )
{
std::cerr << "CONTEXT_MENU runOnSubmenus error: " << e.what() << std::endl;
}
}
wxMenuItem* CONTEXT_MENU::appendCopy( const wxMenuItem* aSource )