From 1876ce90af98722a205d1c7181ef66b6a2b54fc5 Mon Sep 17 00:00:00 2001 From: Melanie Date: Tue, 22 Dec 2009 09:24:01 +0000 Subject: FINALLY! Script compile errors now appear in the script error pane, not in a funky debug window. --- OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs | 2 +- OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs | 2 +- .../Region/ScriptEngine/Shared/CodeTools/Tests/CSCodeGeneratorTest.cs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/CodeTools') diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs index e427f50..b1fb6c2 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs @@ -111,7 +111,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools if (emessage.StartsWith(slinfo+": ")) emessage = emessage.Substring(slinfo.Length+2); - message = String.Format("Line ({0},{1}) {2}", + message = String.Format("({0},{1}) {2}", e.slInfo.lineNumber - 2, e.slInfo.charPosition - 1, emessage); diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs index 3080c71..d8c0ba5 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs @@ -623,7 +623,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools // The Second Life viewer's script editor begins // countingn lines and columns at 0, so we subtract 1. - errtext += String.Format("Line ({0},{1}): {4} {2}: {3}\n", + errtext += String.Format("({0},{1}): {4} {2}: {3}\n", lslPos.Key - 1, lslPos.Value - 1, CompErr.ErrorNumber, text, severity); hadErrors = true; diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CSCodeGeneratorTest.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CSCodeGeneratorTest.cs index 3ca7f7c..63afb0b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CSCodeGeneratorTest.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Tests/CSCodeGeneratorTest.cs @@ -1673,7 +1673,7 @@ default { // The syntax error is on line 6, char 5 (expected ';', found // '}'). - Assert.AreEqual("Line (4,4) syntax error", e.Message); + Assert.AreEqual("(4,4) syntax error", e.Message); throw; } } @@ -1698,7 +1698,7 @@ default catch (System.Exception e) { // The syntax error is on line 5, char 14 (Syntax error) - Assert.AreEqual("Line (3,13) syntax error", e.Message); + Assert.AreEqual("(3,13) syntax error", e.Message); throw; } -- cgit v1.1