throwIfErrorAndFree method

void throwIfErrorAndFree()

Variant for per-call slots (@nitroNativeAsync): checks, then frees the slot itself whether or not an error was present.

Implementation

void throwIfErrorAndFree() {
  try {
    throwIfError();
  } finally {
    free();
  }
}