checkOpen method

void checkOpen()

Checks if connection is open

Implementation

void checkOpen() {
  if (isOpen()) return;

  throw InvalidStateException(null, 'NOT_OPEN', 'Connection was not opened');
}