private void printRawError(int pos,String msg){
  if (source == null || pos == Position.NOPOS) {
    printRawLines(errWriter,"error: " + msg);
  }
 else {
    int line=source.getLineNumber(pos);
    JavaFileObject file=source.getFile();
    if (file != null)     printRawLines(errWriter,file.getName() + ":" + line+ ": "+ msg);
    printErrLine(pos,errWriter);
  }
  errWriter.flush();
}

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