Hopefully fixed library names generated by wx-config for OS/2's PM port.
[wxWidgets.git] / src / common / module.cpp
index eee9507ee1e2513404289f35434282fcc7c08ce4..e4b0ea9afa1d7c5466007c8ac1b2a22edd785223 100644 (file)
@@ -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()