mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 06:06:06 +08:00
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.ExecuteEvent
This commit is contained in:
@@ -191,14 +191,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
//Console.WriteLine("ScriptEngine: Executing function name: " + EventName);
|
||||
#endif
|
||||
// Found
|
||||
try
|
||||
try
|
||||
{
|
||||
ev.Invoke(m_Script, args);
|
||||
}
|
||||
catch (TargetInvocationException tie)
|
||||
{
|
||||
// Grab the inner exception and rethrow it
|
||||
throw tie.InnerException;
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user