/** * Adds an error to the error log. If the parser is in error * recovery mode, the error will not be added to the log. If the * recovery flag is set, this method will set the error recovery * counter thus enter error recovery mode. Only lexical or * syntactical errors require recovery, so this flag shouldn't be * set otherwise. * * @param e the error to add * @param recovery the recover flag */ internal void AddError(ParseException e, bool recovery) { if (errorRecovery <= 0) { errorLog.AddError(e); } if (recovery) { errorRecovery = 3; } }
/** * Adds a parse error to the log. * * @param e the parse error to add */ public void AddError(ParseException e) { errors.Add(e); }