Move 3 more blocks to the common ex handler

This commit is contained in:
Marek Roszko 2023-04-19 21:17:31 -04:00
parent 26f250faa8
commit 2f23df8f5f
2 changed files with 3 additions and 30 deletions

View File

@ -455,18 +455,9 @@ KIWAY_PLAYER* KIWAY::Player( FRAME_T aFrameType, bool doCreate, wxTopLevelWindow
m_playerFrameId[aFrameType].store( frame->GetId() );
return frame;
}
catch( const IO_ERROR& ioe )
{
wxLogError( ioe.What() );
wxLogError( _( "Error loading editor." ) );
}
catch( const std::exception& e )
{
wxLogError( e.what() );
wxLogError( _( "Error loading editor." ) );
}
catch( ... )
{
Pgm().HandleException( std::current_exception() );
wxLogError( _( "Error loading editor." ) );
}
}

View File

@ -494,18 +494,9 @@ struct APP_KICAD_CLI : public wxAppConsole
{
return program.OnPgmRun();
}
catch( const std::exception& e )
{
wxLogError( wxT( "Unhandled exception class: %s what: %s" ),
FROM_UTF8( typeid( e ).name() ), FROM_UTF8( e.what() ) );
}
catch( const IO_ERROR& ioe )
{
wxFprintf( stderr, ioe.What() );
}
catch( ... )
{
wxLogError( wxT( "Unhandled exception of unknown type" ) );
Pgm().HandleException( std::current_exception() );
}
return -1;
@ -549,18 +540,9 @@ struct APP_KICAD_CLI : public wxAppConsole
{
throw;
}
catch( const std::exception& e )
{
wxLogError( "Unhandled exception class: %s what: %s", FROM_UTF8( typeid( e ).name() ),
FROM_UTF8( e.what() ) );
}
catch( const IO_ERROR& ioe )
{
wxLogError( ioe.What() );
}
catch( ... )
{
wxLogError( "Unhandled exception of unknown type" );
Pgm().HandleException( std::current_exception() );
}
return false; // continue on. Return false to abort program