From 638cce09d141a27627c6fa1aa65647df064a6eff Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Tue, 7 Oct 2008 21:59:56 +0000 Subject: Restore "friendly errors" to the XEngine --- .../Region/ScriptEngine/Shared/Api/Runtime/Executor.cs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Runtime') 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 } catch (TargetInvocationException tie) { - // Grab the inner exception and rethrow it, unless the inner - // exception is an EventAbortException as this indicates event - // invokation termination due to a state change. - if ( !(tie.InnerException is EventAbortException) ) - { - throw tie.InnerException; - } + // Grab the inner exception and rethrow it, unless the inner + // exception is an EventAbortException as this indicates event + // invocation termination due to a state change. + // DO NOT THROW JUST THE INNER EXCEPTION! + // FriendlyErrors depends on getting the whole exception! + // + if ( !(tie.InnerException is EventAbortException) ) + { + throw tie; + } } catch (Exception e) { -- cgit v1.1