raiseForStatus function

String raiseForStatus()

Checks for errors in the C++ library and throws a Dart Exception if an error is found.

Implementation

String raiseForStatus() {
  final error = _check_for_error();
  if (error == nullptr) {
    return ''; // No error
  }
  final message = error.toDartString();
  _clear_error();
  throw Exception(message);
}