throwIfPresent method

void throwIfPresent()

Implementation

void throwIfPresent() {
  if (isError()) {
    throw Exception(getErrorMessage());
  }
}