From 336c761ba0915dfd6c397e9e9284222231de3214 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Thu, 22 May 2008 12:07:47 +0000 Subject: [PATCH] Mantis 1357 Patch - Thanks mikem! --- .../Common/ScriptEngineBase/EventQueueThreadClass.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs index 997f46f858..6f266c3d78 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs @@ -296,18 +296,22 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase { // Send inner exception string[] lines=e.InnerException.ToString().Replace("\r", "").Split('\n'); - int line=0; + string line = " (unknown line)"; foreach (string t in lines) { int idx=t.IndexOf("SecondLife.Script."); if (idx != -1) { int colon=t.IndexOf(":"); - line=Convert.ToInt32(t.Substring(colon+1)); - break; + + if(-1 != colon) + { + line = " at line " + Convert.ToInt32(t.Substring(colon + 1)).ToString(); + break; + } } } - text += e.InnerException.Message.ToString()+" in line "+line.ToString(); + text += e.InnerException.Message.ToString() + line; } else {