aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-12-06 00:22:52 +0000
committerJustin Clark-Casey (justincc)2012-12-06 00:22:52 +0000
commit1c9ecc55d3ae52548f974c4c19cc1f8ed6fb7d88 (patch)
tree3b28eecaf5a31995798b029d16806367adfb2ed7 /OpenSim/Region/ScriptEngine
parentminor: Fix more compiler warnings in CoreModules tests by properly overriding... (diff)
downloadopensim-SC_OLD-1c9ecc55d3ae52548f974c4c19cc1f8ed6fb7d88.zip
opensim-SC_OLD-1c9ecc55d3ae52548f974c4c19cc1f8ed6fb7d88.tar.gz
opensim-SC_OLD-1c9ecc55d3ae52548f974c4c19cc1f8ed6fb7d88.tar.bz2
opensim-SC_OLD-1c9ecc55d3ae52548f974c4c19cc1f8ed6fb7d88.tar.xz
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.
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs12
1 files changed, 11 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
index 8e81e9f..5ad6eeb 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
@@ -785,6 +785,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
785 ChatTypeEnum.DebugChannel, 2147483647, 785 ChatTypeEnum.DebugChannel, 2147483647,
786 part.AbsolutePosition, 786 part.AbsolutePosition,
787 part.Name, part.UUID, false); 787 part.Name, part.UUID, false);
788
789
790 m_log.DebugFormat(
791 "[SCRIPT INSTANCE]: Runtime error in script {0}, part {1} {2} at {3} in {4}, displayed error {5}, actual exception {6}",
792 ScriptName,
793 PrimName,
794 part.UUID,
795 part.AbsolutePosition,
796 part.ParentGroup.Scene.Name,
797 text.Replace("\n", "\\n"),
798 e.InnerException);
788 } 799 }
789 catch (Exception) 800 catch (Exception)
790 { 801 {
@@ -1026,7 +1037,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
1026 "({0}): {1}", scriptLine - 1, 1037 "({0}): {1}", scriptLine - 1,
1027 e.InnerException.Message); 1038 e.InnerException.Message);
1028 1039
1029 System.Console.WriteLine(e.ToString()+"\n");
1030 return message; 1040 return message;
1031 } 1041 }
1032 } 1042 }