checkStatus method

void checkStatus(
  1. Pointer<OrtStatus> status
)

Checks an OrtStatus and throws if it indicates an error.

Implementation

void checkStatus(Pointer<OrtStatus> status) {
  if (status == nullptr) return;

  final message = getErrorMessage(status).toDartString();
  releaseStatus(status);
  throw OnnxRuntimeException(message);
}