public void printError ( SourcePosition pos , String msg ) { if ( diagListener != null ) { report ( DiagnosticType . ERROR , pos , msg ) ; return ; } if ( nerrors < MaxErrors ) { String prefix = ( pos == null ) ? programName : pos . toString ( ) ; errWriter . println ( prefix + ": " + getText ( "javadoc.error" ) + " - " + msg ) ; errWriter . flush ( ) ; prompt ( ) ; nerrors ++ ; } }
Print error message increment error count . Part of DocErrorReporter .