code: public void rawError(int pos, String msg) {
          PrintWriter errWriter = writers.get(WriterKind.ERROR);
          if (nerrors < MaxErrors && shouldReport(currentSourceFile(), pos)) {
              printRawDiag(errWriter, "error: ", pos, msg);
              prompt();
              nerrors++;
          }
          errWriter.flush();
      }
docs: report an error: