2006-12-18 Marek Sieradzki <marek.sieradzki@gmail.com>
authorMarek Sieradzki <msierad@mono-cvs.ximian.com>
Mon, 18 Dec 2006 21:32:30 +0000 (21:32 -0000)
committerMarek Sieradzki <msierad@mono-cvs.ximian.com>
Mon, 18 Dec 2006 21:32:30 +0000 (21:32 -0000)
        * BuildItemGroup.cs (Clone): Throw exception.

        * Project.cs (Load): Throw InvalidProjectFileException if anything
        goes wrong.

svn path=/trunk/mcs/; revision=69688

mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/BuildItemGroup.cs
mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/ChangeLog
mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Project.cs

index 750a16ea7c7e431f1b38edcba8d02aa047e2857b..c21949eead4049019a1d90671483b99d7823707f 100644 (file)
@@ -93,9 +93,17 @@ namespace Microsoft.Build.BuildEngine {
                [MonoTODO]
                public BuildItemGroup Clone (bool deepClone)
                {
-                       BuildItemGroup big = new BuildItemGroup ();
-                       // FIXME: add copying of items
-                       return big;
+                       if (deepClone) {
+                               if (FromXml)
+                                       throw new NotImplementedException ();
+                               else
+                                       throw new NotImplementedException ();
+                       } else {
+                               if (FromXml)
+                                       throw new InvalidOperationException ("A shallow clone of this object cannot be created.");
+                               else
+                                       throw new NotImplementedException ();
+                       }
                }
 
                public IEnumerator GetEnumerator ()
index 58c4ff1f3e6aa7454d800b6891c2596003b90e81..28e8df4894c931ed1a1189887ff63aedb2a721a2 100644 (file)
@@ -1,3 +1,10 @@
+2006-12-18  Marek Sieradzki  <marek.sieradzki@gmail.com>
+
+       * BuildItemGroup.cs (Clone): Throw exception.
+
+       * Project.cs (Load): Throw InvalidProjectFileException if anything
+       goes wrong.
+
 2006-12-16  Marek Sieradzki  <marek.sieradzki@gmail.com>
 
        * ItemReference.cs: Avoid KeyNotFoundException in ConvertToString ()
index fc5f1d11eb2b087f9dd37f4357095307fb288301..4b0b6e7d226f0e36b6906eefd0ce3b9f2e3fbf08 100644 (file)
@@ -260,8 +260,8 @@ namespace Microsoft.Build.BuildEngine {
                        this.fullFileName = Path.GetFullPath (projectFileName);
                        try {
                                DoLoad (new StreamReader (projectFileName));
-                       } catch {
-                               Console.WriteLine ("Failure to load: {0}", projectFileName);
+                       } catch (Exception e) {
+                               throw new InvalidProjectFileException (e.Message, e);
                        }
                }