diff options
Diffstat (limited to 'OpenSim/ApplicationPlugins/ScriptEngine/RegionScriptEngineBase.cs')
-rw-r--r-- | OpenSim/ApplicationPlugins/ScriptEngine/RegionScriptEngineBase.cs | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/OpenSim/ApplicationPlugins/ScriptEngine/RegionScriptEngineBase.cs b/OpenSim/ApplicationPlugins/ScriptEngine/RegionScriptEngineBase.cs index e6f5210..ec676f2 100644 --- a/OpenSim/ApplicationPlugins/ScriptEngine/RegionScriptEngineBase.cs +++ b/OpenSim/ApplicationPlugins/ScriptEngine/RegionScriptEngineBase.cs | |||
@@ -74,16 +74,19 @@ namespace OpenSim.ApplicationPlugins.ScriptEngine | |||
74 | m_log.Info("[" + Name + "]: Loading: " + c); | 74 | m_log.Info("[" + Name + "]: Loading: " + c); |
75 | lock (Components) | 75 | lock (Components) |
76 | { | 76 | { |
77 | try | 77 | lock (ComponentRegistry.providers) |
78 | { | 78 | { |
79 | if (ComponentRegistry.providers.ContainsKey(c)) | 79 | try |
80 | Components.Add(Activator.CreateInstance(ComponentRegistry.providers[c]) as ComponentBase); | 80 | { |
81 | else | 81 | if (ComponentRegistry.providers.ContainsKey(c)) |
82 | m_log.Error("[" + Name + "]: Component \"" + c + "\" not found, can not load"); | 82 | Components.Add(Activator.CreateInstance(ComponentRegistry.providers[c]) as ComponentBase); |
83 | } | 83 | else |
84 | catch (Exception ex) | 84 | m_log.Error("[" + Name + "]: Component \"" + c + "\" not found, can not load"); |
85 | { | 85 | } |
86 | m_log.Error("[" + Name + "]: Exception loading \"" + c + "\": " + ex.ToString()); | 86 | catch (Exception ex) |
87 | { | ||
88 | m_log.Error("[" + Name + "]: Exception loading \"" + c + "\": " + ex.ToString()); | ||
89 | } | ||
87 | } | 90 | } |
88 | } | 91 | } |
89 | } | 92 | } |