Mantis#2336. Thank you kindly, Ralphos for a patch that:
Prevent EventAbortException inner exceptions of TargetInvocationException being re-thrown from OpenSim.Region.ScriptEngine.Shared.ScriptBase. Executor.ExecuteEvent0.6.0-stable
parent
4f6cdc08d6
commit
dedc1baeb7
|
@ -191,14 +191,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||||
//Console.WriteLine("ScriptEngine: Executing function name: " + EventName);
|
//Console.WriteLine("ScriptEngine: Executing function name: " + EventName);
|
||||||
#endif
|
#endif
|
||||||
// Found
|
// Found
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
ev.Invoke(m_Script, args);
|
ev.Invoke(m_Script, args);
|
||||||
}
|
}
|
||||||
catch (TargetInvocationException tie)
|
catch (TargetInvocationException tie)
|
||||||
{
|
{
|
||||||
// Grab the inner exception and rethrow it
|
// Grab the inner exception and rethrow it, unless the inner
|
||||||
throw tie.InnerException;
|
// exception is an EventAbortException as this indicates event
|
||||||
|
// invokation termination due to a state change.
|
||||||
|
if ( !(tie.InnerException is EventAbortException) )
|
||||||
|
{
|
||||||
|
throw tie.InnerException;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue