throwIfError static method

void throwIfError(
  1. int code
)

Throw an SDKException if code indicates failure (non-zero). Mirrors Swift's SDKException.throwIfError(_:).

Implementation

static void throwIfError(int code) {
  final ex = fromResult(code);
  if (ex != null) throw ex;
}