diff options
Diffstat (limited to '')
4 files changed, 23 insertions, 30 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 |
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 47f04d5..9b78d53 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | |||
@@ -514,7 +514,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
514 | try | 514 | try |
515 | { | 515 | { |
516 | // DISPLAY ERROR INWORLD | 516 | // DISPLAY ERROR INWORLD |
517 | string text = "Error compiling script:\n" + e.ToString(); | 517 | string text = "Error compiling script:\n" + e.Message.ToString(); |
518 | if (text.Length > 1000) | 518 | if (text.Length > 1000) |
519 | text = text.Substring(0, 1000); | 519 | text = text.Substring(0, 1000); |
520 | World.SimChat(Utils.StringToBytes(text), | 520 | World.SimChat(Utils.StringToBytes(text), |