1.1 --- a/core/systems/PluginSys.cpp Mon Mar 03 15:27:27 2008 +0000
1.2 +++ b/core/systems/PluginSys.cpp Tue Mar 11 19:25:19 2008 +0000
1.3 @@ -2149,6 +2149,8 @@
1.4 g_RootMenu.ConsolePrint("[SM] Listing %d plugin%s:", GetPluginCount(), (plnum > 1) ? "s" : "");
1.5 }
1.6
1.7 + SourceHook::List<IPlugin *> m_FailList;
1.8 +
1.9 IPluginIterator *iter = GetPluginIterator();
1.10 for (; iter->MorePlugins(); iter->NextPlugin(), id++)
1.11 {
1.12 @@ -2159,6 +2161,12 @@
1.13 if (pl->GetStatus() != Plugin_Running)
1.14 {
1.15 len += UTIL_Format(buffer, sizeof(buffer), " %02d <%s>", id, GetStatusText(pl->GetStatus()));
1.16 +
1.17 + if (pl->GetStatus() <= Plugin_Error)
1.18 + {
1.19 + /* Plugin has failed to load. */
1.20 + m_FailList.push_back(pl);
1.21 + }
1.22 }
1.23 else
1.24 {
1.25 @@ -2177,6 +2185,22 @@
1.26 }
1.27
1.28 iter->Release();
1.29 +
1.30 + if (!m_FailList.empty())
1.31 + {
1.32 + g_RootMenu.ConsolePrint("Load Errors:");
1.33 +
1.34 + SourceHook::List<IPlugin *>::iterator _iter;
1.35 +
1.36 + CPlugin *pl;
1.37 +
1.38 + for (_iter=m_FailList.begin(); _iter!=m_FailList.end(); _iter++)
1.39 + {
1.40 + pl = (CPlugin *)*_iter;
1.41 + g_RootMenu.ConsolePrint("%s: %s",(IS_STR_FILLED(pl->GetPublicInfo()->name)) ? pl->GetPublicInfo()->name : pl->GetFilename(), pl->m_errormsg);
1.42 + }
1.43 + }
1.44 +
1.45 return;
1.46 }
1.47 else if (strcmp(cmd, "load") == 0)