Enable or disable parse error tracking for the next parse.
@param maxErrors the maximum number of errors to track. Set to 0 to disable.
@return this, for chaining
353336
public Parser setTrackErrors(int maxErrors) {
        errors = maxErrors > 0 ? ParseErrorList.tracking(maxErrors) : ParseErrorList.noTracking();
        return this;
    }
153648
public T error(CharSequence error) {
        if (view!=null && view instanceof TextView) {
            ((TextView) view).setError(error);
        }
        return self();
    }
1232845
public void setErrors(java.util.Collection<String> errors) {
        if (errors == null) {
            this.errors = null;
            return;
        }

        this.errors = new java.util.ArrayList<String>(errors);
    }
784808
public void setMaxProcessedResults(String maxProcessedResults) {

        try {
            m_maxProcessedResults = Integer.parseInt(maxProcessedResults);
        } catch (Exception e) {
            LOG.warn(
                "Could not parse value "
                    + maxProcessedResults
                    + " as Integer to set the limit for the number of results a Solr index can return.");
        }
        if (m_maxProcessedResults <= 0) {
            m_maxProcessedResults = DEFAULT_MAX_PROCESSED_RESULTS;
            LOG.warn(
                "The maximal number of results to return by a Solr index should be greater than 0. Reset it to the default value "
                    + DEFAULT_MAX_PROCESSED_RESULTS
                    + ".");
        }
    }
731169
func (s *SendCommandInput) SetMaxErrors(v string) *SendCommandInput {
	s.MaxErrors = &v
	return s
}
248232
func (s *TargetLocation) SetTargetLocationMaxErrors(v string) *TargetLocation {
	s.TargetLocationMaxErrors = &v
	return s
}
132981
public static ParseException create(List<ParseError> errors) {
        if (errors.size() == 1) {
            return new ParseException(errors.get(0).getMessage(), errors);
        } else if (errors.size() > 1) {
            return new ParseException(String.format("%d errors occured. First: %s",
                                                    errors.size(),
                                                    errors.get(0).getMessage()), errors);
        } else {
            return new ParseException("An unknown error occured", errors);
        }
    }
273108
public void setErrorMessage(String msg) {
        if (msg != null && msg.trim().length() > 0) {
            errorMessage = msg;
        }
    }
679453
func (s *StartAutomationExecutionInput) SetMaxErrors(v string) *StartAutomationExecutionInput {
	s.MaxErrors = &v
	return s
}
1090092
func (s *AutomationExecutionMetadata) SetMaxErrors(v string) *AutomationExecutionMetadata {
	s.MaxErrors = &v
	return s
}
412640
private final void error() throws ParserException {
	Integer currentState = stateStack.peek();
	parserErrors.addError(currentState);
	if (backtrackEnabled && !backtrackStack.isEmpty()) {
	    trackBack();
	    return;
	}
	if (!backtrackEnabled) {
	    logger.trace("No valid action available and back tracking is disabled. Aborting near '"
		    + getTokenStream().getCodeSample(maxPosition) + "'...");
	} else {
	    logger.trace("No valid action available and back tracking stack is empty. Aborting near '"
		    + getTokenStream().getCodeSample(maxPosition) + "'...");
	}
	throw new ParserException(
		"Error! Could not parse the token stream near '" + getTokenStream().getCodeSample(maxPosition) + "'!");
    }
1125417
def truncate_to_max(errors, max_errors):
    
    if len(errors) > max_errors:
        start1, end1, err1, msg1, replacements = errors[0]

        if len(errors) == (max_errors + 1):
            msg1 += " Found once elsewhere."
        else:
            msg1 += " Found {} times elsewhere.".format(len(errors))

        errors = errors[1:max_errors]
        errors = [(start1, end1, err1, msg1, replacements)] + errors

    return errors
978335
public RiakNode setMaxConnections(int maxConnections)
    {
        stateCheck(State.CREATED, State.RUNNING, State.HEALTH_CHECKING);
        if (maxConnections >= getMinConnections())
        {
            permits.setMaxPermits(maxConnections);
        }
        else
        {
            throw new IllegalArgumentException("Max connections less than min connections");
        }
        // TODO: reap delta?
        return this;
    }
380047
public function setMaxResults($maxResults)
    {
        $this->limit = $maxResults;
        
        if( $this->query instanceof Query )
        {
            $this->query->setMaxResults($maxResults);
        }

        return $this;
    }
552410
void setError(Exception error) {
		if (this.error != null) {
			throw new IllegalStateException(
					"Cannot reassign the error value of a response.");
		}
		this.error = error;
		this.ready = true;
		synchronized (this) {
			this.notifyAll();
		}
	}
170779
public void setValidationErrors(java.util.Collection<ValidationError> validationErrors) {
        if (validationErrors == null) {
            this.validationErrors = null;
            return;
        }

        this.validationErrors = new com.amazonaws.internal.SdkInternalList<ValidationError>(validationErrors);
    }
867589
protected Throwable composeErrors(Throwable... errors) {

    if (errors == null) {
      return new NullPointerException("errors");
    } else if (errors.length == 1) {
      return errors[0];
    } else {
      return new ComposedException(errors);
    }
  }