2006-11-14 Atsushi Enomoto <atsushi@ximian.com>
[mono.git] / mcs / ilasm / codegen / FieldTable.cs
index a4a2c9625be3741911edc6cd655a871bd8f5dc09..0a5aa46d52e96034b6881cf5ac9fca16bf5a7e96 100644 (file)
@@ -91,7 +91,7 @@ namespace Mono.ILASM {
                                FieldTableItem table_item = (FieldTableItem) dic_entry.Value;
                                if (table_item.Defined)
                                        continue;
-                               throw new Exception (String.Format ("Field: {0} is not defined.", dic_entry.Key));
+                               Report.Error (String.Format ("Field: {0} is not defined.", dic_entry.Key));
                        }
                        return true;
                }
@@ -121,10 +121,8 @@ namespace Mono.ILASM {
                {
                        FieldTableItem item = table[signature] as FieldTableItem;
                        
-                       if ((item != null) && (item.Defined)) {
-                               throw new Exception (String.Format ("Field: {0} defined in multiple locations.", 
-                                       signature));
-                       }
+                       if ((item != null) && (item.Defined))
+                               Report.Error ("Field: " + signature + " defined in multiple locations.");
                }
        }