From 2fdb42aec03be76f8208d591009994aff7a5c2d8 Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Sat, 4 Oct 2008 19:04:58 +0000 Subject: Mantis#2316. Thank you kindly, CMickeyb for a patch that: Addresses llDie issues. The attached patch catches run time exceptions that occur during method invocation (of type TargetInvocationException) and exposes the internal exception. This makes it possible to pass out the SelfDeleteException. Also added handlers in a couple places to make sure that exception was being passed out far enough to be handled correctly. Tested on DNE. --- .../DotNetEngine/EventQueueThreadClass.cs | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine') diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueThreadClass.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueThreadClass.cs index 2306bce..f568dc5 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueThreadClass.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueThreadClass.cs @@ -196,13 +196,15 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine SceneObjectPart part = lastScriptEngine.World.GetSceneObjectPart( lastLocalID); - if (part != null && part.ParentGroup != null) lastScriptEngine.World.DeleteSceneObject( part.ParentGroup); } - catch (Exception) + catch (Exception e) { + if (lastScriptEngine != null) + lastScriptEngine.Log.WarnFormat("[{0}]: Exception {1} thrown",ScriptEngineName,e.GetType().ToString()); + throw e; } } } @@ -288,11 +290,21 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine InExecution = false; } } + catch (SelfDeleteException sde) + { + // Make sure this exception isn't consumed here... we need it + throw sde; + } + catch (TargetInvocationException tie) + { + // Probably don't need to special case this one + throw tie; + } catch (Exception e) { - InExecution = false; - string text = FormatException(e, QIS.LineMap); - + InExecution = false; + string text = FormatException(e, QIS.LineMap); + // DISPLAY ERROR INWORLD // if (e.InnerException != null) -- cgit v1.1