Add better diagnostics for invalid properties
authorMarek Safar <marek.safar@gmail.com>
Wed, 31 Jul 2013 16:00:05 +0000 (18:00 +0200)
committerMarek Safar <marek.safar@gmail.com>
Wed, 31 Jul 2013 16:00:38 +0000 (18:00 +0200)
mcs/mcs/import.cs

index d5788cc35c08aa7a267e5ea65f390b8ff26eae24..2d787dd4e3095c4746c71e22abd13b0480568ba0 100644 (file)
@@ -2110,7 +2110,13 @@ namespace Mono.CSharp
                                                if (get == null && set == null)
                                                        continue;
 
-                                               imported = importer.CreateProperty (p, declaringType, get, set);
+                                               try {
+                                                       imported = importer.CreateProperty (p, declaringType, get, set);
+                                               } catch (Exception ex) {
+                                                       throw new InternalErrorException (ex, "Could not import property `{0}' inside `{1}'",
+                                                               p.Name, declaringType.GetSignatureForError ());
+                                               }
+
                                                if (imported == null)
                                                        continue;