Author: mhutch
Date: 2008-01-02 20:45:43 -0500 (Wed, 02 Jan 2008)
New Revision: 92145

Modified:
   trunk/monodevelop/main/src/addins/MonoDevelop.DesignerSupport/ChangeLog
   
trunk/monodevelop/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport/CodeBehindService.cs
Log:
* MonoDevelop.DesignerSupport/CodeBehindService.cs: Improve error
  reporting for invalid IClasses.

Modified: 
trunk/monodevelop/main/src/addins/MonoDevelop.DesignerSupport/ChangeLog
===================================================================
--- trunk/monodevelop/main/src/addins/MonoDevelop.DesignerSupport/ChangeLog     
2008-01-03 01:34:33 UTC (rev 92144)
+++ trunk/monodevelop/main/src/addins/MonoDevelop.DesignerSupport/ChangeLog     
2008-01-03 01:45:43 UTC (rev 92145)
@@ -1,3 +1,8 @@
+2008-01-02  Michael Hutchinson <[EMAIL PROTECTED]> 
+
+       * MonoDevelop.DesignerSupport/CodeBehindService.cs: Improve error 
reporting
+         for invalid IClasses.
+
 2007-12-14  Lluis Sanchez Gual <[EMAIL PROTECTED]> 
 
        * MonoDevelop.DesignerSupport.mdp: Updated project files. The order of

Modified: 
trunk/monodevelop/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport/CodeBehindService.cs
===================================================================
--- 
trunk/monodevelop/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport/CodeBehindService.cs
      2008-01-03 01:34:33 UTC (rev 92144)
+++ 
trunk/monodevelop/main/src/addins/MonoDevelop.DesignerSupport/MonoDevelop.DesignerSupport/CodeBehindService.cs
      2008-01-03 01:45:43 UTC (rev 92145)
@@ -302,12 +302,19 @@
                        }
                        
                        foreach (IClass part in child.Parts) {
+                               if (part.Region == null || string.IsNullOrEmpty 
(part.Region.FileName)) {
+                                       LoggingService.LogError ("CodeBehind 
grouping: IClass {0} has not defined a valid region.",
+                                                                  
part.FullyQualifiedName);
+                                       continue;
+                               }
                                ProjectFile partFile = 
proj.ProjectFiles.GetFile (part.Region.FileName);
                                if (partFile == parent)
                                        continue;
-                               if (partFile == null)
-                                       LoggingService.LogWarning ("CodeBehind 
grouping: The file {0} for IClass {1} was not found in the project.",  
part.Region.FileName, part.FullyQualifiedName);
-                               files.Add (partFile);
+                               if (partFile != null)
+                                       files.Add (partFile);
+                               else
+                                       LoggingService.LogError ("CodeBehind 
grouping: The file {0} for IClass {1} was not found in the project.",
+                                                                  
part.Region.FileName, part.FullyQualifiedName);
                        }
                        return files;
                }

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to