diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/CodeTools')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs index e8f2b71..a825eff 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs | |||
@@ -99,10 +99,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools | |||
99 | string message; | 99 | string message; |
100 | 100 | ||
101 | // LL start numbering lines at 0 - geeks! | 101 | // LL start numbering lines at 0 - geeks! |
102 | // Also need to subtract one line we prepend! | ||
102 | // | 103 | // |
104 | string emessage = e.Message; | ||
105 | string slinfo = e.slInfo.ToString(); | ||
106 | |||
107 | // Remove wrong line number info | ||
108 | // | ||
109 | if (emessage.StartsWith(slinfo+": ")) | ||
110 | emessage = emessage.Substring(slinfo.Length+2); | ||
111 | |||
103 | message = String.Format("Line ({0},{1}) {2}", | 112 | message = String.Format("Line ({0},{1}) {2}", |
104 | e.slInfo.lineNumber - 1, | 113 | e.slInfo.lineNumber - 2, |
105 | e.slInfo.charPosition - 1, e.Message); | 114 | e.slInfo.charPosition - 1, emessage); |
106 | 115 | ||
107 | throw new Exception(message); | 116 | throw new Exception(message); |
108 | } | 117 | } |