checkMagic method

void checkMagic(
  1. bool strict
)

Implementation

void checkMagic(bool strict) {
  if (fileCode != MAGIC) {
    String message = "Wrong magic number, expected $MAGIC, got $fileCode";
    if (!strict) {
      ShpLogger().i(message);
    } else {
      throw StateError(message);
    }
  }
}