diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Instance')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs index f9d6eee..9b93135 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs | |||
@@ -55,7 +55,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance | |||
55 | { | 55 | { |
56 | public class ScriptInstance : MarshalByRefObject, IScriptInstance | 56 | public class ScriptInstance : MarshalByRefObject, IScriptInstance |
57 | { | 57 | { |
58 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 58 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
59 | 59 | ||
60 | private IScriptEngine m_Engine; | 60 | private IScriptEngine m_Engine; |
61 | private IScriptWorkItem m_CurrentResult = null; | 61 | private IScriptWorkItem m_CurrentResult = null; |
@@ -109,7 +109,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance | |||
109 | private Dictionary<string,IScriptApi> m_Apis = new Dictionary<string,IScriptApi>(); | 109 | private Dictionary<string,IScriptApi> m_Apis = new Dictionary<string,IScriptApi>(); |
110 | 110 | ||
111 | // Script state | 111 | // Script state |
112 | private string m_State="default"; | 112 | private string m_State = "default"; |
113 | 113 | ||
114 | public Object[] PluginData = new Object[0]; | 114 | public Object[] PluginData = new Object[0]; |
115 | 115 | ||
@@ -127,6 +127,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance | |||
127 | m_minEventDelay = value; | 127 | m_minEventDelay = value; |
128 | else | 128 | else |
129 | m_minEventDelay = 0.0; | 129 | m_minEventDelay = 0.0; |
130 | |||
130 | m_eventDelayTicks = (long)(m_minEventDelay * 10000000L); | 131 | m_eventDelayTicks = (long)(m_minEventDelay * 10000000L); |
131 | m_nextEventTimeTicks = DateTime.Now.Ticks; | 132 | m_nextEventTimeTicks = DateTime.Now.Ticks; |
132 | } | 133 | } |
@@ -296,9 +297,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance | |||
296 | //RemotingServices.GetLifetimeService(m_Script as ScriptBaseClass); | 297 | //RemotingServices.GetLifetimeService(m_Script as ScriptBaseClass); |
297 | // lease.Register(this); | 298 | // lease.Register(this); |
298 | } | 299 | } |
299 | catch (Exception) | 300 | catch (Exception e) |
300 | { | 301 | { |
301 | // m_log.ErrorFormat("[Script] Error loading assembly {0}\n"+e.ToString(), assembly); | 302 | m_log.ErrorFormat( |
303 | "[SCRIPT INSTANCE]: Error loading assembly {0}. Exception {1}{2}", | ||
304 | assembly, e.Message, e.StackTrace); | ||
302 | } | 305 | } |
303 | 306 | ||
304 | try | 307 | try |
@@ -313,9 +316,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance | |||
313 | part.SetScriptEvents(m_ItemID, | 316 | part.SetScriptEvents(m_ItemID, |
314 | (int)m_Script.GetStateEventFlags(State)); | 317 | (int)m_Script.GetStateEventFlags(State)); |
315 | } | 318 | } |
316 | catch (Exception) | 319 | catch (Exception e) |
317 | { | 320 | { |
318 | // m_log.Error("[Script] Error loading script instance\n"+e.ToString()); | 321 | m_log.ErrorFormat( |
322 | "[SCRIPT INSTANCE]: Error loading script instance from assembly {0}. Exception {1}{2}", | ||
323 | assembly, e.Message, e.StackTrace); | ||
324 | |||
319 | return; | 325 | return; |
320 | } | 326 | } |
321 | 327 | ||
@@ -377,12 +383,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance | |||
377 | } | 383 | } |
378 | else | 384 | else |
379 | { | 385 | { |
380 | // m_log.Error("[Script] Unable to load script state: Memory limit exceeded"); | 386 | m_log.ErrorFormat( |
387 | "[SCRIPT INSTANCE]: Unable to load script state from assembly {0}: Memory limit exceeded", | ||
388 | assembly); | ||
381 | } | 389 | } |
382 | } | 390 | } |
383 | catch (Exception) | 391 | catch (Exception e) |
384 | { | 392 | { |
385 | // m_log.ErrorFormat("[Script] Unable to load script state from xml: {0}\n"+e.ToString(), xml); | 393 | m_log.ErrorFormat( |
394 | "[SCRIPT INSTANCE]: Unable to load script state from assembly {0}. XML is {1}. Exception {2}{3}", | ||
395 | assembly, xml, e.Message, e.StackTrace); | ||
386 | } | 396 | } |
387 | } | 397 | } |
388 | // else | 398 | // else |