takeError method

String takeError()

Reads and frees the glue crate's thread-local error slot.

Implementation

String takeError() {
  final p = lastError();
  if (p.address == 0) return 'unknown error';
  return readString(p);
}