throwIfFailed<T> function

void throwIfFailed<T>(
  1. T result
)

Implementation

void throwIfFailed<T>(T result) {
  if (result != cronet.Cronet_RESULT.Cronet_RESULT_SUCCESS) {
    log('bicronet_grpc: throwIfFailed failed at ${StackTrace.current}');
    throw Exception("Unexpected cronet failure: $result");
  }
}