More locks, try's and disable some things in SEC - maybe it won't crash now. :)

This commit is contained in:
Tedd Hansen
2008-09-21 01:09:54 +00:00
parent 9c8aeff27c
commit ec494275a2
3 changed files with 27 additions and 14 deletions

View File

@@ -74,16 +74,19 @@ namespace OpenSim.ApplicationPlugins.ScriptEngine
m_log.Info("[" + Name + "]: Loading: " + c);
lock (Components)
{
try
lock (ComponentRegistry.providers)
{
if (ComponentRegistry.providers.ContainsKey(c))
Components.Add(Activator.CreateInstance(ComponentRegistry.providers[c]) as ComponentBase);
else
m_log.Error("[" + Name + "]: Component \"" + c + "\" not found, can not load");
}
catch (Exception ex)
{
m_log.Error("[" + Name + "]: Exception loading \"" + c + "\": " + ex.ToString());
try
{
if (ComponentRegistry.providers.ContainsKey(c))
Components.Add(Activator.CreateInstance(ComponentRegistry.providers[c]) as ComponentBase);
else
m_log.Error("[" + Name + "]: Component \"" + c + "\" not found, can not load");
}
catch (Exception ex)
{
m_log.Error("[" + Name + "]: Exception loading \"" + c + "\": " + ex.ToString());
}
}
}
}