anchor.diff:          _LinkedNode packageNode = packageToNode[package];
           if (packageNode == null) {
             failed = true;
  +          throw new _LinkException();
           }
           dependencies.add(packageNode);
         } else {
           failed = true;
  +        throw new _LinkException();
         }
       }
   
  
positive.code:       }
      }
  
      if (failed) {
        return const <_LinkedNode>[];
      }
      return dependencies.toList();
    }
  
  
negative.code:     }
      Set<String> libraryUris = uriToNode.keys.toSet();
      // Perform linking.
      Map<String, LinkedLibraryBuilder> linkedLibraries =
          link(libraryUris, (String absoluteUri) {
        LinkedLibrary dependencyLibrary = store.linkedMap[absoluteUri];
        if (dependencyLibrary == null) {
          scc.forEach((node) => node.failed = true);
          throw new _LinkException();
        }
        return dependencyLibrary;
      }, (String absoluteUri) {
        UnlinkedUnit unlinkedUnit = store.unlinkedMap[absoluteUri];
        if (unlinkedUnit == null) {
          scc.forEach((node) => node.failed = true);
          throw new _LinkException();
        }
        return unlinkedUnit;
      }, strong);
      // Assemble linked bundles and put them into the store.
      for (_LinkedNode node in scc) {
        PackageBundleAssembler assembler = new PackageBundleAssembler();
        linkedLibraries.forEach((uri, linkedLibrary) {
          if (identical(uriToNode[uri], node)) {
            assembler.addLinkedLibrary(uri, linkedLibrary);
          }
        });
        node.linkedBuilder = assembler.assemble();
        store.addBundle(null, node.linkedBuilder);
      }
    }
  }
  
  /**
   * This exception is thrown during linking as a signal that linking of the
   * current bundle cannot be performed, e.g. when a dependency cannot be found.
   */
  class _LinkException {}
  