aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Executor.cs17
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs13
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs21
3 files changed, 22 insertions, 29 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Executor.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Executor.cs
index 43e3f3c..63ae6c7 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Executor.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Executor.cs
@@ -197,13 +197,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
197 } 197 }
198 catch (TargetInvocationException tie) 198 catch (TargetInvocationException tie)
199 { 199 {
200 // Grab the inner exception and rethrow it, unless the inner 200 // Grab the inner exception and rethrow it, unless the inner
201 // exception is an EventAbortException as this indicates event 201 // exception is an EventAbortException as this indicates event
202 // invokation termination due to a state change. 202 // invocation termination due to a state change.
203 if ( !(tie.InnerException is EventAbortException) ) 203 // DO NOT THROW JUST THE INNER EXCEPTION!
204 { 204 // FriendlyErrors depends on getting the whole exception!
205 throw tie.InnerException; 205 //
206 } 206 if ( !(tie.InnerException is EventAbortException) )
207 {
208 throw tie;
209 }
207 } 210 }
208 catch (Exception e) 211 catch (Exception e)
209 { 212 {
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs
index e8f2b71..a825eff 100644
--- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs
@@ -99,10 +99,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
99 string message; 99 string message;
100 100
101 // LL start numbering lines at 0 - geeks! 101 // LL start numbering lines at 0 - geeks!
102 // Also need to subtract one line we prepend!
102 // 103 //
104 string emessage = e.Message;
105 string slinfo = e.slInfo.ToString();
106
107 // Remove wrong line number info
108 //
109 if (emessage.StartsWith(slinfo+": "))
110 emessage = emessage.Substring(slinfo.Length+2);
111
103 message = String.Format("Line ({0},{1}) {2}", 112 message = String.Format("Line ({0},{1}) {2}",
104 e.slInfo.lineNumber - 1, 113 e.slInfo.lineNumber - 2,
105 e.slInfo.charPosition - 1, e.Message); 114 e.slInfo.charPosition - 1, emessage);
106 115
107 throw new Exception(message); 116 throw new Exception(message);
108 } 117 }
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
index dcf3043..e39a0c2 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
@@ -613,27 +613,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
613 m_InEvent = false; 613 m_InEvent = false;
614 m_CurrentEvent = String.Empty; 614 m_CurrentEvent = String.Empty;
615 615
616 if (!(e is TargetInvocationException) || (!(e.InnerException is EventAbortException) && (!(e.InnerException is SelfDeleteException)))) 616 if (!(e is TargetInvocationException) || !(e.InnerException is SelfDeleteException))
617 { 617 {
618 if (e is System.Threading.ThreadAbortException)
619 {
620 lock (m_EventQueue)
621 {
622 if ((m_EventQueue.Count > 0) && m_RunEvents && (!m_ShuttingDown))
623 {
624 m_CurrentResult=m_Engine.QueueEventHandler(this);
625 }
626 else
627 {
628 m_CurrentResult = null;
629 }
630 }
631
632 m_DetectParams = null;
633
634 return 0;
635 }
636
637 try 618 try
638 { 619 {
639 // DISPLAY ERROR INWORLD 620 // DISPLAY ERROR INWORLD