diff options
author | Tedd Hansen | 2007-08-26 13:31:58 +0000 |
---|---|---|
committer | Tedd Hansen | 2007-08-26 13:31:58 +0000 |
commit | ebb0099816299108b025b55e62ef1f15fe60c2f9 (patch) | |
tree | 5b663b915ad6536e50802c75beb6ac4b4a272f8f /OpenSim/Region/ScriptEngine/Common | |
parent | Bugfix for last commit, { instead of ( (diff) | |
download | opensim-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/Common')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/Executor.cs | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/Executor.cs b/OpenSim/Region/ScriptEngine/Common/Executor.cs index e3d574b..d165722 100644 --- a/OpenSim/Region/ScriptEngine/Common/Executor.cs +++ b/OpenSim/Region/ScriptEngine/Common/Executor.cs | |||
@@ -45,8 +45,8 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
45 | { | 45 | { |
46 | // IMPORTANT: Types and MemberInfo-derived objects require a LOT of memory. | 46 | // IMPORTANT: Types and MemberInfo-derived objects require a LOT of memory. |
47 | // Instead use RuntimeTypeHandle, RuntimeFieldHandle and RunTimeHandle (IntPtr) instead! | 47 | // Instead use RuntimeTypeHandle, RuntimeFieldHandle and RunTimeHandle (IntPtr) instead! |
48 | try | 48 | //try |
49 | { | 49 | //{ |
50 | if (m_Running == false) | 50 | if (m_Running == false) |
51 | { | 51 | { |
52 | // Script is inactive, do not execute! | 52 | // Script is inactive, do not execute! |
@@ -68,7 +68,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
68 | MethodInfo mi = type.GetMethod(EventName); | 68 | MethodInfo mi = type.GetMethod(EventName); |
69 | Events.Add(EventName, mi); | 69 | Events.Add(EventName, mi); |
70 | } | 70 | } |
71 | catch (Exception e) | 71 | catch |
72 | { | 72 | { |
73 | // Event name not found, cache it as not found | 73 | // Event name not found, cache it as not found |
74 | Events.Add(EventName, null); | 74 | Events.Add(EventName, null); |
@@ -86,19 +86,21 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
86 | } | 86 | } |
87 | 87 | ||
88 | // Found | 88 | // Found |
89 | try | 89 | //try |
90 | { | 90 | //{ |
91 | // Invoke it | 91 | // Invoke it |
92 | ev.Invoke(m_Script, args); | 92 | ev.Invoke(m_Script, args); |
93 | 93 | ||
94 | } | 94 | //} |
95 | catch (Exception e) | 95 | //catch (Exception e) |
96 | { | 96 | //{ |
97 | // TODO: Send to correct place | 97 | // // TODO: Send to correct place |
98 | Console.WriteLine("ScriptEngine Exception attempting to executing script function: " + e.ToString()); | 98 | // Console.WriteLine("ScriptEngine Exception attempting to executing script function: " + e.ToString()); |
99 | } | 99 | //} |
100 | } | 100 | |
101 | catch { } | 101 | |
102 | //} | ||
103 | //catch { } | ||
102 | } | 104 | } |
103 | 105 | ||
104 | 106 | ||