aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueManager.cs
diff options
context:
space:
mode:
authorTedd Hansen2007-08-26 13:31:58 +0000
committerTedd Hansen2007-08-26 13:31:58 +0000
commitebb0099816299108b025b55e62ef1f15fe60c2f9 (patch)
tree5b663b915ad6536e50802c75beb6ac4b4a272f8f /OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueManager.cs
parentBugfix for last commit, { instead of ( (diff)
downloadopensim-SC_OLD-ebb0099816299108b025b55e62ef1f15fe60c2f9.zip
opensim-SC_OLD-ebb0099816299108b025b55e62ef1f15fe60c2f9.tar.gz
opensim-SC_OLD-ebb0099816299108b025b55e62ef1f15fe60c2f9.tar.bz2
opensim-SC_OLD-ebb0099816299108b025b55e62ef1f15fe60c2f9.tar.xz
Run-time script errors are now shown in-world. No line number though, might require script to be compiled with (slow) debug information.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueManager.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueManager.cs29
1 files changed, 29 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueManager.cs
index 7018dfe..c724f01 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueManager.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueManager.cs
@@ -177,6 +177,35 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
177 { 177 {
178 myScriptEngine.myScriptManager.ExecuteEvent(QIS.localID, QIS.itemID, QIS.FunctionName, QIS.param); 178 myScriptEngine.myScriptManager.ExecuteEvent(QIS.localID, QIS.itemID, QIS.FunctionName, QIS.param);
179 } 179 }
180 catch (Exception e)
181 {
182 // DISPLAY ERROR INWORLD
183 string text = "Error executing script:\r\n";
184 if (e.InnerException != null)
185 { // Send inner exception
186 text += e.InnerException.Message.ToString();
187 }
188 else
189 { // Send normal
190 text += e.Message.ToString();
191 }
192 try
193 {
194 if (text.Length > 1500)
195 text = text.Substring(0, 1500);
196 IScriptHost m_host = myScriptEngine.World.GetSceneObjectPart(QIS.localID);
197 //if (m_host != null)
198 //{
199 myScriptEngine.World.SimChat(Helpers.StringToField(text), 1, m_host.AbsolutePosition, m_host.Name, m_host.UUID);
200 } catch {
201 //}
202 //else
203 //{
204 // T oconsole
205 Console.WriteLine("Unable to send text in-world:\r\n" + text);
206 }
207
208 }
180 finally 209 finally
181 { 210 {
182 ReleaseLock(QIS.localID); 211 ReleaseLock(QIS.localID);