generate an error message when a module initialization fails, otherwise it's impossible to know why the program failed to start up
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34558 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -69,8 +69,12 @@ bool wxModule::InitializeModules()
|
|||||||
wxModuleList::compatibility_iterator node;
|
wxModuleList::compatibility_iterator node;
|
||||||
for ( node = m_modules.GetFirst(); node; node = node->GetNext() )
|
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
|
// clean up already initialized modules - process in reverse order
|
||||||
wxModuleList::compatibility_iterator n;
|
wxModuleList::compatibility_iterator n;
|
||||||
for ( n = node->GetPrevious(); n; n = n->GetPrevious() )
|
for ( n = node->GetPrevious(); n; n = n->GetPrevious() )
|
||||||
|
|||||||
Reference in New Issue
Block a user