Move 3 more blocks to the common ex handler
This commit is contained in:
parent
26f250faa8
commit
2f23df8f5f
|
@ -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." ) );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue