Removal of script that was unable to compile no longer crashes server.

Displays script compile error messages in-world.
This commit is contained in:
Tedd Hansen
2007-08-25 20:34:54 +00:00
parent 65d6ef1bc1
commit 80234b98e5
3 changed files with 45 additions and 14 deletions

View File

@@ -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);
}