From 1bc3e9f105175f45dd1a3fa4356117f8018e65ec Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Thu, 26 Mar 2015 18:27:13 +0100 Subject: [PATCH] Better error messge when a .kiface file ( or, if it exists, a .dll or .so shared library ) is not found at start up --- common/kiway.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/common/kiway.cpp b/common/kiway.cpp index 03b515336b..4d6e6fa2a9 100644 --- a/common/kiway.cpp +++ b/common/kiway.cpp @@ -206,10 +206,16 @@ KIFACE* KIWAY::KiFACE( FACE_T aFaceId, bool doLoad ) // installation bug. wxString msg = wxString::Format( wxT( - "Fatal Installation Bug\nmissing file:\n'%s'\n\nargv[0]:\n'%s'" ), - GetChars( dname ), - GetChars( wxStandardPaths::Get().GetExecutablePath() ) - ); + "Fatal Installation Bug. File:\n" + "'%s'\ncould not be loaded\n" ), GetChars( dname ) ); + + if( ! wxFileExists( dname ) ) + msg << wxT( "It is missing.\n" ); + else + msg << wxT( "Perhaps a wxWidgets shared (.dll or .so) file is missing.\n" ); + + msg << wxT( "From command line: argv[0]:\n'" ); + msg << wxStandardPaths::Get().GetExecutablePath() << wxT( "'\n" ); // This is a fatal error, one from which we cannot recover, nor do we want // to protect against in client code which would require numerous noisy