aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Instance
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Instance')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs25
1 files changed, 24 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
index 5793cc9..5ad6eeb 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
@@ -173,6 +173,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
173 173
174 public Queue EventQueue { get; private set; } 174 public Queue EventQueue { get; private set; }
175 175
176 public long EventsQueued
177 {
178 get
179 {
180 lock (EventQueue)
181 return EventQueue.Count;
182 }
183 }
184
185 public long EventsProcessed { get; private set; }
186
176 public int StartParam { get; set; } 187 public int StartParam { get; set; }
177 188
178 public TaskInventoryItem ScriptTask { get; private set; } 189 public TaskInventoryItem ScriptTask { get; private set; }
@@ -774,6 +785,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
774 ChatTypeEnum.DebugChannel, 2147483647, 785 ChatTypeEnum.DebugChannel, 2147483647,
775 part.AbsolutePosition, 786 part.AbsolutePosition,
776 part.Name, part.UUID, false); 787 part.Name, part.UUID, false);
788
789
790 m_log.DebugFormat(
791 "[SCRIPT INSTANCE]: Runtime error in script {0}, part {1} {2} at {3} in {4}, displayed error {5}, actual exception {6}",
792 ScriptName,
793 PrimName,
794 part.UUID,
795 part.AbsolutePosition,
796 part.ParentGroup.Scene.Name,
797 text.Replace("\n", "\\n"),
798 e.InnerException);
777 } 799 }
778 catch (Exception) 800 catch (Exception)
779 { 801 {
@@ -808,6 +830,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
808 // script engine to run the next event. 830 // script engine to run the next event.
809 lock (EventQueue) 831 lock (EventQueue)
810 { 832 {
833 EventsProcessed++;
834
811 if (EventQueue.Count > 0 && Running && !ShuttingDown) 835 if (EventQueue.Count > 0 && Running && !ShuttingDown)
812 { 836 {
813 m_CurrentWorkItem = Engine.QueueEventHandler(this); 837 m_CurrentWorkItem = Engine.QueueEventHandler(this);
@@ -1013,7 +1037,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
1013 "({0}): {1}", scriptLine - 1, 1037 "({0}): {1}", scriptLine - 1,
1014 e.InnerException.Message); 1038 e.InnerException.Message);
1015 1039
1016 System.Console.WriteLine(e.ToString()+"\n");
1017 return message; 1040 return message;
1018 } 1041 }
1019 } 1042 }