function raiseError(suffix: string, resultFailure: ?CheckFailure): empty {
  if (resultFailure != null) {
    const path = resultFailure.path.toString();
    const message = resultFailure.message;
    throw err(`[refine.js (path=${path}, message=${message})]: ${suffix}`);
  }

  throw err(`[refine.js (null result)]: ${suffix}`);
}
helper for raising an error based on a failure