aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs18
1 files changed, 17 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs
index 321dd5e..3a5cc23 100644
--- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs
+++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs
@@ -27,9 +27,11 @@
27 27
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Reflection;
30using System.Threading; 31using System.Threading;
31using System.Globalization; 32using System.Globalization;
32using libsecondlife; 33using libsecondlife;
34using log4net;
33using OpenSim.Framework; 35using OpenSim.Framework;
34using OpenSim.Region.Environment.Scenes.Scripting; 36using OpenSim.Region.Environment.Scenes.Scripting;
35 37
@@ -40,6 +42,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
40 /// </summary> 42 /// </summary>
41 public class EventQueueThreadClass : iScriptEngineFunctionModule 43 public class EventQueueThreadClass : iScriptEngineFunctionModule
42 { 44 {
45 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
46
43 /// <summary> 47 /// <summary>
44 /// How many ms to sleep if queue is empty 48 /// How many ms to sleep if queue is empty
45 /// </summary> 49 /// </summary>
@@ -313,7 +317,19 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
313 { 317 {
314 // Not sure why this is converted to an int then back to a string, either 318 // Not sure why this is converted to an int then back to a string, either
315 // way, need to skip the word "line " in the substring 319 // way, need to skip the word "line " in the substring
316 line = " at line " + Convert.ToInt32(t.Substring(colon + 6)).ToString(); 320 try
321 {
322 line = " at line " + Convert.ToInt32(t.Substring(colon + 6)).ToString();
323 }
324 catch (ArgumentOutOfRangeException e)
325 {
326 // FIXME: Big fat temporary patch to stop the Substring above throwing an exception
327 // and stopping a proper kill of the script. We're making an unwarranted assumption
328 // about the size of t. This needs to be fixed properly.
329 m_log.ErrorFormat("[SCRIPT ENGINE]: Line number conversion exception {0}", e);
330 line = " at line (unavailable)";
331 }
332
317 break; 333 break;
318 } 334 }
319 } 335 }