2003-07-21 Martin Baulig <martin@ximian.com>
[mono.git] / mcs / mcs / report.cs
index 50c355f8ae73336ef656846920190bd091ae04bf..f5c90e4b4ddea74a2cd0099fde22a25e14d74ecd 100644 (file)
@@ -81,6 +81,9 @@ namespace Mono.CSharp {
 
                static public void Error (int code, Location l, string text)
                {
+                       if (code < 0)
+                               code = 8000-code;
+                       
                        string msg = String.Format (
                                "{0}({1}) error CS{2:0000}: {3}", l.Name, l.Row, code, text);
 //                             "{0}({1}) error CS{2}: {3}", l.Name, l.Row, code, text);
@@ -91,6 +94,9 @@ namespace Mono.CSharp {
 
                static public void Warning (int code, Location l, string text)
                {
+                       if (code < 0)
+                               code = 8000-code;
+                       
                        if (warning_ignore_table != null){
                                if (warning_ignore_table.Contains (code))
                                        return;
@@ -137,6 +143,9 @@ namespace Mono.CSharp {
 
                static public void Error (int code, string text)
                {
+                       if (code < 0)
+                               code = 8000-code;
+                       
                        string msg = String.Format ("error CS{0:0000}: {1}", code, text);
 //                     string msg = String.Format ("error CS{0}: {1}", code, text);
                        
@@ -193,7 +202,7 @@ namespace Mono.CSharp {
                                        if (first)
                                                first = false;
                                        else
-                                               sb.Append (",");
+                                               sb.Append (", ");
                                        if (arg == null)
                                                sb.Append ("null");
                                        else if (arg is ICollection)
@@ -218,7 +227,7 @@ namespace Mono.CSharp {
                                if (first)
                                        first = false;
                                else
-                                       sb.Append (",");
+                                       sb.Append (", ");
                                sb.Append (o);
                        }