X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/77ffb5937e89927b621128789401db8921fe580f..b9efe021b554fa3967d1442cf758435c5cd5ae8f:/src/common/module.cpp?ds=inline diff --git a/src/common/module.cpp b/src/common/module.cpp index 1913dcd7e5..e4b0ea9afa 100644 --- a/src/common/module.cpp +++ b/src/common/module.cpp @@ -6,7 +6,7 @@ // Created: 04/11/98 // RCS-ID: $Id$ // Copyright: (c) Wolfram Gloger and Guilhem Lavaux -// Licence: wxWidgets licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) @@ -22,6 +22,8 @@ #include "wx/module.h" #include "wx/hash.h" +#include "wx/intl.h" +#include "wx/log.h" #include "wx/listimpl.cpp" WX_DEFINE_LIST(wxModuleList); @@ -69,8 +71,12 @@ bool wxModule::InitializeModules() wxModuleList::compatibility_iterator node; for ( node = m_modules.GetFirst(); node; node = node->GetNext() ) { - if ( !node->GetData()->Init() ) + wxModule *module = node->GetData(); + if ( !module->Init() ) { + wxLogError(_("Module \"%s\" initialization failed"), + module->GetClassInfo()->GetClassName()); + // clean up already initialized modules - process in reverse order wxModuleList::compatibility_iterator n; for ( n = node->GetPrevious(); n; n = n->GetPrevious() ) @@ -78,11 +84,11 @@ bool wxModule::InitializeModules() n->GetData()->OnExit(); } - return FALSE; + return false; } } - return TRUE; + return true; } void wxModule::CleanUpModules()