diff options
author | Diva Canto | 2012-12-06 20:04:59 -0800 |
---|---|---|
committer | Diva Canto | 2012-12-06 20:04:59 -0800 |
commit | 3c9f8c9c46546da0944632b853313aa52f38cc00 (patch) | |
tree | 548bef5b08feb9e6df9e136de5e4a4fd4ca3c549 /OpenSim/Region/ScriptEngine/Shared | |
parent | Trying to prevent old route of sending attachments, simulator version unknown... (diff) | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC-3c9f8c9c46546da0944632b853313aa52f38cc00.zip opensim-SC-3c9f8c9c46546da0944632b853313aa52f38cc00.tar.gz opensim-SC-3c9f8c9c46546da0944632b853313aa52f38cc00.tar.bz2 opensim-SC-3c9f8c9c46546da0944632b853313aa52f38cc00.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
6 files changed, 37 insertions, 8 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 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs index 2c9d9e8..cb7291a 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiInventoryTests.cs | |||
@@ -57,8 +57,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
57 | protected XEngine.XEngine m_engine; | 57 | protected XEngine.XEngine m_engine; |
58 | 58 | ||
59 | [SetUp] | 59 | [SetUp] |
60 | public void SetUp() | 60 | public override void SetUp() |
61 | { | 61 | { |
62 | base.SetUp(); | ||
63 | |||
62 | IConfigSource initConfigSource = new IniConfigSource(); | 64 | IConfigSource initConfigSource = new IniConfigSource(); |
63 | IConfig config = initConfigSource.AddConfig("XEngine"); | 65 | IConfig config = initConfigSource.AddConfig("XEngine"); |
64 | config.Set("Enabled", "true"); | 66 | config.Set("Enabled", "true"); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs index 57f19b9..d9b17d7 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiLinkingTests.cs | |||
@@ -62,8 +62,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
62 | protected XEngine.XEngine m_engine; | 62 | protected XEngine.XEngine m_engine; |
63 | 63 | ||
64 | [SetUp] | 64 | [SetUp] |
65 | public void SetUp() | 65 | public override void SetUp() |
66 | { | 66 | { |
67 | base.SetUp(); | ||
68 | |||
67 | IConfigSource initConfigSource = new IniConfigSource(); | 69 | IConfigSource initConfigSource = new IniConfigSource(); |
68 | IConfig config = initConfigSource.AddConfig("XEngine"); | 70 | IConfig config = initConfigSource.AddConfig("XEngine"); |
69 | config.Set("Enabled", "true"); | 71 | config.Set("Enabled", "true"); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiListTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiListTests.cs index 182b07b..98017d8 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiListTests.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiListTests.cs | |||
@@ -51,8 +51,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
51 | private LSL_Api m_lslApi; | 51 | private LSL_Api m_lslApi; |
52 | 52 | ||
53 | [SetUp] | 53 | [SetUp] |
54 | public void SetUp() | 54 | public override void SetUp() |
55 | { | 55 | { |
56 | base.SetUp(); | ||
57 | |||
56 | IConfigSource initConfigSource = new IniConfigSource(); | 58 | IConfigSource initConfigSource = new IniConfigSource(); |
57 | IConfig config = initConfigSource.AddConfig("XEngine"); | 59 | IConfig config = initConfigSource.AddConfig("XEngine"); |
58 | config.Set("Enabled", "true"); | 60 | config.Set("Enabled", "true"); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAppearanceTest.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAppearanceTest.cs index 213f33f..1381d2b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAppearanceTest.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiAppearanceTest.cs | |||
@@ -57,8 +57,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
57 | protected XEngine.XEngine m_engine; | 57 | protected XEngine.XEngine m_engine; |
58 | 58 | ||
59 | [SetUp] | 59 | [SetUp] |
60 | public void SetUp() | 60 | public override void SetUp() |
61 | { | 61 | { |
62 | base.SetUp(); | ||
63 | |||
62 | IConfigSource initConfigSource = new IniConfigSource(); | 64 | IConfigSource initConfigSource = new IniConfigSource(); |
63 | IConfig config = initConfigSource.AddConfig("XEngine"); | 65 | IConfig config = initConfigSource.AddConfig("XEngine"); |
64 | config.Set("Enabled", "true"); | 66 | config.Set("Enabled", "true"); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs index b49bcc2..d6c82f1 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/OSSL_ApiNpcTests.cs | |||
@@ -127,12 +127,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests | |||
127 | OSSL_Api osslApi = new OSSL_Api(); | 127 | OSSL_Api osslApi = new OSSL_Api(); |
128 | osslApi.Initialize(m_engine, so.RootPart, null); | 128 | osslApi.Initialize(m_engine, so.RootPart, null); |
129 | 129 | ||
130 | string npcRaw; | ||
131 | bool gotExpectedException = false; | 130 | bool gotExpectedException = false; |
132 | try | 131 | try |
133 | { | 132 | { |
134 | npcRaw | 133 | osslApi.osNpcCreate("Jane", "Doe", new LSL_Types.Vector3(128, 128, 128), "not existing notecard name"); |
135 | = osslApi.osNpcCreate("Jane", "Doe", new LSL_Types.Vector3(128, 128, 128), "not existing notecard name"); | ||
136 | } | 134 | } |
137 | catch (ScriptException) | 135 | catch (ScriptException) |
138 | { | 136 | { |