Move 3 more blocks to the common ex handler
This commit is contained in:
parent
18ac4c2288
commit
d97de297af
|
@ -452,18 +452,9 @@ KIWAY_PLAYER* KIWAY::Player( FRAME_T aFrameType, bool doCreate, wxTopLevelWindow
|
||||||
m_playerFrameId[aFrameType].store( frame->GetId() );
|
m_playerFrameId[aFrameType].store( frame->GetId() );
|
||||||
return frame;
|
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( ... )
|
catch( ... )
|
||||||
{
|
{
|
||||||
|
Pgm().HandleException( std::current_exception() );
|
||||||
wxLogError( _( "Error loading editor." ) );
|
wxLogError( _( "Error loading editor." ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -479,18 +479,9 @@ struct APP_KICAD_CLI : public wxAppConsole
|
||||||
{
|
{
|
||||||
return program.OnPgmRun();
|
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( ... )
|
catch( ... )
|
||||||
{
|
{
|
||||||
wxLogError( wxT( "Unhandled exception of unknown type" ) );
|
Pgm().HandleException( std::current_exception() );
|
||||||
}
|
}
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -560,18 +551,9 @@ struct APP_KICAD_CLI : public wxAppConsole
|
||||||
{
|
{
|
||||||
throw;
|
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( ... )
|
catch( ... )
|
||||||
{
|
{
|
||||||
wxLogError( "Unhandled exception of unknown type" );
|
Pgm().HandleException( std::current_exception() );
|
||||||
}
|
}
|
||||||
|
|
||||||
return false; // continue on. Return false to abort program
|
return false; // continue on. Return false to abort program
|
||||||
|
|
Loading…
Reference in New Issue