From ebb0099816299108b025b55e62ef1f15fe60c2f9 Mon Sep 17 00:00:00 2001 From: Tedd Hansen Date: Sun, 26 Aug 2007 13:31:58 +0000 Subject: Run-time script errors are now shown in-world. No line number though, might require script to be compiled with (slow) debug information. --- OpenSim/Region/ScriptEngine/Common/Executor.cs | 28 ++++++++++++++------------ 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Common/Executor.cs') 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 { // IMPORTANT: Types and MemberInfo-derived objects require a LOT of memory. // Instead use RuntimeTypeHandle, RuntimeFieldHandle and RunTimeHandle (IntPtr) instead! - try - { + //try + //{ if (m_Running == false) { // Script is inactive, do not execute! @@ -68,7 +68,7 @@ namespace OpenSim.Region.ScriptEngine.Common MethodInfo mi = type.GetMethod(EventName); Events.Add(EventName, mi); } - catch (Exception e) + catch { // Event name not found, cache it as not found Events.Add(EventName, null); @@ -86,19 +86,21 @@ namespace OpenSim.Region.ScriptEngine.Common } // Found - try - { + //try + //{ // Invoke it ev.Invoke(m_Script, args); - } - catch (Exception e) - { - // TODO: Send to correct place - Console.WriteLine("ScriptEngine Exception attempting to executing script function: " + e.ToString()); - } - } - catch { } + //} + //catch (Exception e) + //{ + // // TODO: Send to correct place + // Console.WriteLine("ScriptEngine Exception attempting to executing script function: " + e.ToString()); + //} + + + //} + //catch { } } -- cgit v1.1