diff options
author | Melanie | 2012-12-07 03:49:04 +0000 |
---|---|---|
committer | Melanie | 2012-12-07 03:49:04 +0000 |
commit | 2cb824d3fcd37b9f9c9a9981702b81643c531a1b (patch) | |
tree | 8bfb77166642a49f142e60a3486a264e7635ef83 /OpenSim/Region/ScriptEngine/Shared/Instance | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC-2cb824d3fcd37b9f9c9a9981702b81643c531a1b.zip opensim-SC-2cb824d3fcd37b9f9c9a9981702b81643c531a1b.tar.gz opensim-SC-2cb824d3fcd37b9f9c9a9981702b81643c531a1b.tar.bz2 opensim-SC-2cb824d3fcd37b9f9c9a9981702b81643c531a1b.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/CoreModules/Avatar/InstantMessage/MessageTransferModule.cs
OpenSim/Region/Framework/Scenes/Scene.cs
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Instance')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs | 25 |
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 771db0c..538cb8b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs | |||
@@ -174,6 +174,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance | |||
174 | 174 | ||
175 | public Queue EventQueue { get; private set; } | 175 | public Queue EventQueue { get; private set; } |
176 | 176 | ||
177 | public long EventsQueued | ||
178 | { | ||
179 | get | ||
180 | { | ||
181 | lock (EventQueue) | ||
182 | return EventQueue.Count; | ||
183 | } | ||
184 | } | ||
185 | |||
186 | public long EventsProcessed { get; private set; } | ||
187 | |||
177 | public int StartParam { get; set; } | 188 | public int StartParam { get; set; } |
178 | 189 | ||
179 | public TaskInventoryItem ScriptTask { get; private set; } | 190 | public TaskInventoryItem ScriptTask { get; private set; } |
@@ -776,6 +787,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance | |||
776 | ChatTypeEnum.DebugChannel, 2147483647, | 787 | ChatTypeEnum.DebugChannel, 2147483647, |
777 | part.AbsolutePosition, | 788 | part.AbsolutePosition, |
778 | part.Name, part.UUID, false); | 789 | part.Name, part.UUID, false); |
790 | |||
791 | |||
792 | m_log.DebugFormat( | ||
793 | "[SCRIPT INSTANCE]: Runtime error in script {0}, part {1} {2} at {3} in {4}, displayed error {5}, actual exception {6}", | ||
794 | ScriptName, | ||
795 | PrimName, | ||
796 | part.UUID, | ||
797 | part.AbsolutePosition, | ||
798 | part.ParentGroup.Scene.Name, | ||
799 | text.Replace("\n", "\\n"), | ||
800 | e.InnerException); | ||
779 | } | 801 | } |
780 | catch (Exception) | 802 | catch (Exception) |
781 | { | 803 | { |
@@ -810,6 +832,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance | |||
810 | // script engine to run the next event. | 832 | // script engine to run the next event. |
811 | lock (EventQueue) | 833 | lock (EventQueue) |
812 | { | 834 | { |
835 | EventsProcessed++; | ||
836 | |||
813 | if (EventQueue.Count > 0 && Running && !ShuttingDown) | 837 | if (EventQueue.Count > 0 && Running && !ShuttingDown) |
814 | { | 838 | { |
815 | m_CurrentWorkItem = Engine.QueueEventHandler(this); | 839 | m_CurrentWorkItem = Engine.QueueEventHandler(this); |
@@ -1015,7 +1039,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance | |||
1015 | "({0}): {1}", scriptLine - 1, | 1039 | "({0}): {1}", scriptLine - 1, |
1016 | e.InnerException.Message); | 1040 | e.InnerException.Message); |
1017 | 1041 | ||
1018 | System.Console.WriteLine(e.ToString()+"\n"); | ||
1019 | return message; | 1042 | return message; |
1020 | } | 1043 | } |
1021 | } | 1044 | } |