Fix clashing error dialogs when can't load dynamic library.

This commit is contained in:
Alex 2023-03-19 13:01:54 +03:00
parent b89545e484
commit 672c468342
2 changed files with 8 additions and 8 deletions

View File

@ -431,15 +431,17 @@ KIWAY_PLAYER* KIWAY::Player( FRAME_T aFrameType, bool doCreate, wxTopLevelWindow
}
catch( const IO_ERROR& ioe )
{
DisplayErrorMessage( nullptr, _( "Error loading editor." ), ioe.What() );
wxLogError( ioe.What() );
wxLogError( _( "Error loading editor." ) );
}
catch( const std::exception& e)
catch( const std::exception& e )
{
DisplayErrorMessage( nullptr, _( "Error loading editor." ), e.what() );
wxLogError( e.what() );
wxLogError( _( "Error loading editor." ) );
}
catch( ... )
{
DisplayErrorMessage( nullptr, _( "Error loading editor." ) );
wxLogError( _( "Error loading editor." ) );
}
}

View File

@ -754,15 +754,13 @@ int KICAD_MANAGER_CONTROL::ShowPlayer( const TOOL_EVENT& aEvent )
}
catch( const IO_ERROR& err )
{
wxMessageBox( _( "Application failed to load:\n" ) + err.What(), _( "KiCad Error" ),
wxOK | wxICON_ERROR, m_frame );
wxLogError( _( "Application failed to load:\n" ) + err.What() );
return -1;
}
if ( !player )
{
wxMessageBox( _( "Application failed to load." ), _( "KiCad Error" ),
wxOK | wxICON_ERROR, m_frame );
wxLogError( _( "Application failed to load." ) );
return -1;
}