aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
diff options
context:
space:
mode:
authorMelanie Thielker2008-09-27 05:31:43 +0000
committerMelanie Thielker2008-09-27 05:31:43 +0000
commit85068dae60db02b168a29ffd75e1408e30d279e1 (patch)
tree8389c246a6e9891eb1bf310b85cba19a1668d790 /OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
parentMantis #2277 (diff)
downloadopensim-SC_OLD-85068dae60db02b168a29ffd75e1408e30d279e1.zip
opensim-SC_OLD-85068dae60db02b168a29ffd75e1408e30d279e1.tar.gz
opensim-SC_OLD-85068dae60db02b168a29ffd75e1408e30d279e1.tar.bz2
opensim-SC_OLD-85068dae60db02b168a29ffd75e1408e30d279e1.tar.xz
Add friendly error messages to both engines.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
index 8329805..1c1dcf3 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
@@ -53,6 +53,8 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
53 public int StartParam; 53 public int StartParam;
54 public AppDomain AppDomain; 54 public AppDomain AppDomain;
55 public Dictionary<string, IScriptApi> Apis; 55 public Dictionary<string, IScriptApi> Apis;
56 public Dictionary<KeyValuePair<int,int>, KeyValuePair<int,int>>
57 LineMap;
56 } 58 }
57 59
58 public class ScriptManager 60 public class ScriptManager
@@ -159,6 +161,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
159 m_scriptEngine.m_AppDomainManager.LoadScript( 161 m_scriptEngine.m_AppDomainManager.LoadScript(
160 CompiledScriptFile, out id.AppDomain); 162 CompiledScriptFile, out id.AppDomain);
161 163
164 id.LineMap = LSLCompiler.LineMap();
162 id.Script = CompiledScript; 165 id.Script = CompiledScript;
163 id.Source = Script; 166 id.Source = Script;
164 id.StartParam = startParam; 167 id.StartParam = startParam;
@@ -212,7 +215,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
212 try 215 try
213 { 216 {
214 // DISPLAY ERROR INWORLD 217 // DISPLAY ERROR INWORLD
215 string text = "Error compiling script:\r\n" + 218 string text = "Error compiling script:\n" +
216 e.Message.ToString(); 219 e.Message.ToString();
217 if (text.Length > 1100) 220 if (text.Length > 1100)
218 text = text.Substring(0, 1099); 221 text = text.Substring(0, 1099);