diff options
author | Melanie Thielker | 2008-08-29 19:57:01 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-08-29 19:57:01 +0000 |
commit | fda5457996ec1b5862af228d765c6d462550e5c1 (patch) | |
tree | 77ce8950296dc371a3882bab29a353ca6a7b0b93 /OpenSim/Region/ScriptEngine/Shared | |
parent | Mantis#2067. Thank you kindly, HomerHorwitz for a patch that: (diff) | |
download | opensim-SC-fda5457996ec1b5862af228d765c6d462550e5c1.zip opensim-SC-fda5457996ec1b5862af228d765c6d462550e5c1.tar.gz opensim-SC-fda5457996ec1b5862af228d765c6d462550e5c1.tar.bz2 opensim-SC-fda5457996ec1b5862af228d765c6d462550e5c1.tar.xz |
Maintis #2078
Thank you, ralphos, for a patch that corrects the handling of compiler
warnings in the XEngine, which were erronoeously reported as errors!
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs index db90f3e..6028179 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs | |||
@@ -543,6 +543,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools | |||
543 | string errtext = String.Empty; | 543 | string errtext = String.Empty; |
544 | foreach (CompilerError CompErr in results.Errors) | 544 | foreach (CompilerError CompErr in results.Errors) |
545 | { | 545 | { |
546 | string severity = "Error"; | ||
547 | if ( CompErr.IsWarning ) | ||
548 | { | ||
549 | severity = "Warning"; | ||
550 | } | ||
551 | |||
546 | if (m_UseCompiler) | 552 | if (m_UseCompiler) |
547 | { | 553 | { |
548 | KeyValuePair<int, int> lslPos; | 554 | KeyValuePair<int, int> lslPos; |
@@ -559,16 +565,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools | |||
559 | 565 | ||
560 | // The Second Life viewer's script editor begins | 566 | // The Second Life viewer's script editor begins |
561 | // countingn lines and columns at 0, so we subtract 1. | 567 | // countingn lines and columns at 0, so we subtract 1. |
562 | errtext += String.Format("Line {0}, column {1}, Error Number: {2}, '{3}'\r\n", lslPos.Key - 1, lslPos.Value - 1, CompErr.ErrorNumber, CompErr.ErrorText); | 568 | errtext += String.Format("Line {0}, column {1}, {4} Number: {2}, '{3}'\r\n", lslPos.Key - 1, lslPos.Value - 1, CompErr.ErrorNumber, CompErr.ErrorText, severity); |
569 | |||
563 | } | 570 | } |
564 | else | 571 | else |
565 | { | 572 | { |
566 | errtext += "Line number " + (CompErr.Line - LinesToRemoveOnError) + | 573 | errtext += "Line number " + (CompErr.Line - LinesToRemoveOnError) + |
567 | ", Error Number: " + CompErr.ErrorNumber + | 574 | ", " + severity + " Number: " + CompErr.ErrorNumber + |
568 | ", '" + CompErr.ErrorText + "'\r\n"; | 575 | ", '" + CompErr.ErrorText + "'\r\n"; |
569 | } | 576 | } |
570 | } | 577 | } |
571 | Console.WriteLine("[COMPILER ERROR]:" + errtext); | 578 | Console.WriteLine("[COMPILER MESSAGES]: " + errtext); |
572 | if (!File.Exists(OutFile)) | 579 | if (!File.Exists(OutFile)) |
573 | { | 580 | { |
574 | throw new Exception(errtext); | 581 | throw new Exception(errtext); |