Instead of printing script errors out to console, put to debug log so that we also get timestamps.
This commit also adds script name, part name, uuid, etc. for later identification. This information has been sent to console since 2009 but may be turned down if it proves too noisy. However, I still currently need it to investigate some region problems probably triggered by scripting.0.7.4-extended
parent
d558bbfa35
commit
d8c88f4894
|
@ -785,6 +785,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
||||||
ChatTypeEnum.DebugChannel, 2147483647,
|
ChatTypeEnum.DebugChannel, 2147483647,
|
||||||
part.AbsolutePosition,
|
part.AbsolutePosition,
|
||||||
part.Name, part.UUID, false);
|
part.Name, part.UUID, false);
|
||||||
|
|
||||||
|
|
||||||
|
m_log.DebugFormat(
|
||||||
|
"[SCRIPT INSTANCE]: Runtime error in script {0}, part {1} {2} at {3} in {4}, displayed error {5}, actual exception {6}",
|
||||||
|
ScriptName,
|
||||||
|
PrimName,
|
||||||
|
part.UUID,
|
||||||
|
part.AbsolutePosition,
|
||||||
|
part.ParentGroup.Scene.Name,
|
||||||
|
text.Replace("\n", "\\n"),
|
||||||
|
e.InnerException);
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
|
@ -1026,7 +1037,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
||||||
"({0}): {1}", scriptLine - 1,
|
"({0}): {1}", scriptLine - 1,
|
||||||
e.InnerException.Message);
|
e.InnerException.Message);
|
||||||
|
|
||||||
System.Console.WriteLine(e.ToString()+"\n");
|
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue