Fix a null reference exception when the exception thrown by a script
is not a TargetInvocationException
0.6.0-stable
Melanie Thielker 2008-09-29 10:30:01 +00:00
parent 6758ecc403
commit 538f51f36d
1 changed files with 3 additions and 0 deletions

View File

@ -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'});