Commits

Mark Heath committed 0d41245

improved an error message

  • Participants
  • Parent commits 9a7fe07

Comments (0)

Files changed (1)

File GraphPad/Logic/Node.cs

         public void AddChild(Node child)
         {
             if (IsAncestor(child))
-                throw new InvalidOperationException("Invalid DAG");
+            {
+                string message = String.Format("Invalid DAG {0} cannot be a child and ancestor of {1}", child.Name, this.Name);
+                throw new InvalidOperationException(message);
+            }
             AddConnection(child, RelationshipType.Child);
         }