throwOnError method

void throwOnError()

Throws an AskarErrorCodeException if the error code is not successful.

Implementation

void throwOnError() {
  if (!isSuccess()) {
    throw AskarErrorCodeException(ErrorCode.fromInt(code));
  }
}