requireVersion static method

void requireVersion(
  1. String found,
  2. String context
)

Throws unless found is version, naming both.

Implementation

static void requireVersion(String found, String context) {
  if (found == version) return;
  throw ArgumentD4rtException(
    'Unsupported $context: format version "$found", this reader reads '
    '"$version". Bundles do not carry across format versions; regenerate '
    'the bundle with a tom_ast_generator that writes "$version".',
  );
}