From be686f80a354103cd6630cd8f4e5fb40a4093549 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 11 Mar 2013 23:01:07 +0000 Subject: minor: Remove mono compiler warnings from LSL_ApiHttpTests --- OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiHttpTests.cs | 1 - 1 file changed, 1 deletion(-) (limited to 'OpenSim/Region/ScriptEngine/Shared') diff --git a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiHttpTests.cs b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiHttpTests.cs index b0baa1c..ab44e38 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiHttpTests.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Tests/LSL_ApiHttpTests.cs @@ -209,7 +209,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Tests += (itemId, evp) => m_lslApi.llHTTPResponse(evp.Params[0].ToString(), 200, testResponse); // Console.WriteLine("Trying {0}", returnedUri); - HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(returnedUri); AssertHttpResponse(returnedUri, testResponse); -- cgit v1.1 From 0d25be3f8162fc4e99cd5abdaceb425a1f7370fe Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 13 Mar 2013 00:19:37 +0000 Subject: Make C# scripts return correct error line and column numbers instead of failing because they have no linemap. Adapted fix from http://opensimulator.org/mantis/view.php?id=6571 Thanks Nickel Briand --- OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared') diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs index 9d20c9e..b71afe3 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs @@ -662,13 +662,18 @@ namespace SecondLife { string severity = CompErr.IsWarning ? "Warning" : "Error"; - KeyValuePair lslPos; + KeyValuePair errorPos; // Show 5 errors max, but check entire list for errors if (severity == "Error") { - lslPos = FindErrorPosition(CompErr.Line, CompErr.Column, m_lineMaps[assembly]); + // C# scripts will not have a linemap since theres no line translation involved. + if (!m_lineMaps.ContainsKey(assembly)) + errorPos = new KeyValuePair(CompErr.Line, CompErr.Column); + else + errorPos = FindErrorPosition(CompErr.Line, CompErr.Column, m_lineMaps[assembly]); + string text = CompErr.ErrorText; // Use LSL type names @@ -678,7 +683,7 @@ namespace SecondLife // The Second Life viewer's script editor begins // countingn lines and columns at 0, so we subtract 1. errtext += String.Format("({0},{1}): {4} {2}: {3}\n", - lslPos.Key - 1, lslPos.Value - 1, + errorPos.Key - 1, errorPos.Value - 1, CompErr.ErrorNumber, text, severity); hadErrors = true; } -- cgit v1.1