code: public void extractAndWriteMsgs(
        SoyMsgBundleHandler msgBundleHandler, OutputFileOptions options, ByteSink output)
        throws IOException {
      resetErrorReporter();
      SoyMsgBundle bundle = doExtractMsgs();
      msgBundleHandler.writeExtractedMsgs(bundle, options, output, errorReporter);
      throwIfErrorsPresent();
      reportWarnings();
    }
docs: Extracts all messages from this Soy file set and writes the messages to an output sink.
  
  @param msgBundleHandler Handler to write the messages.
  @param options Options to configure how to write the extracted messages.
  @param output Where to write the extracted messages.
  @throws IOException If there are errors writing to the output.