requireBundleAgreement function

void requireBundleAgreement({
  1. required Map<String, String> vertex,
  2. required Map<String, String> fragment,
})

Throws a StageAgreementException when checkBundleAgreement finds anything: what a bundle's section writer calls before it writes.

Implementation

void requireBundleAgreement({
  required Map<String, String> vertex,
  required Map<String, String> fragment,
}) {
  final found = checkBundleAgreement(vertex: vertex, fragment: fragment);
  if (found.isNotEmpty) throw StageAgreementException(found);
}