From 80234b98e5dd03de08229fb5cc6dd2a42e70ec24 Mon Sep 17 00:00:00 2001 From: Tedd Hansen Date: Sat, 25 Aug 2007 20:34:54 +0000 Subject: Removal of script that was unable to compile no longer crashes server. Displays script compile error messages in-world. --- OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs') diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs index f24eb63..bdeed8f 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs @@ -93,12 +93,15 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL // TODO: Return errors to user somehow if (results.Errors.Count > 0) { + + string errtext = ""; foreach (CompilerError CompErr in results.Errors) { - Console.WriteLine("Line number " + CompErr.Line + + errtext += "Line number " + CompErr.Line + ", Error Number: " + CompErr.ErrorNumber + - ", '" + CompErr.ErrorText + ";"); + ", '" + CompErr.ErrorText + "'\r\n"; } + throw new Exception(errtext); } -- cgit v1.1