getResult method

O getResult()

Implementation

O getResult() {
  if (!ok) {
    throw FormatException(errorMessage);
  }

  return result as O;
}