code: private void printRawDiag(PrintWriter pw, String prefix, int pos, String msg) {
          if (source == null || pos == Position.NOPOS) {
              printRawLines(pw, prefix + msg);
          } else {
              int line = source.getLineNumber(pos);
              JavaFileObject file = source.getFile();
              if (file != null)
                  printRawLines(pw,
                             file.getName() + ":" +
                             line + ": " + msg);
              printErrLine(pos, pw);
          }
          pw.flush();
      }
docs: print an error or warning message: