mirror of
https://github.com/opensim/opensim.git
synced 2026-05-15 11:25:39 +08:00
Mantis #2293
Fix a null reference exception when the exception thrown by a script is not a TargetInvocationException
This commit is contained in:
@@ -825,6 +825,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
||||
|
||||
string FormatException(Exception e)
|
||||
{
|
||||
if (e.InnerException == null) // Not a normal runtime error
|
||||
return e.ToString();
|
||||
|
||||
string message = "Runtime error:\n" + e.InnerException.StackTrace;
|
||||
string[] lines = message.Split(new char[] {'\n'});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user