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

(cherry picked from commit 672c468342)
This commit is contained in:
Alex 2023-03-19 13:01:54 +03:00 committed by dsa-t
parent 92fc4872e8
commit ba7598d90d
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 ) 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( ... ) 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 ) catch( const IO_ERROR& err )
{ {
wxMessageBox( _( "Application failed to load:\n" ) + err.What(), _( "KiCad Error" ), wxLogError( _( "Application failed to load:\n" ) + err.What() );
wxOK | wxICON_ERROR, m_frame );
return -1; return -1;
} }
if ( !player ) if ( !player )
{ {
wxMessageBox( _( "Application failed to load." ), _( "KiCad Error" ), wxLogError( _( "Application failed to load." ) );
wxOK | wxICON_ERROR, m_frame );
return -1; return -1;
} }