solr-protolib/src/main/java/com/streamsets/pipeline/stage/destination/solr/SolrTarget.java
private void handleError(Record record, Errors errorTemplate, String ... errorArguments) throws StageException {
    switch (missingFieldAction) {
      case DISCARD:
        LOG.debug(errorTemplate.getMessage(), errorArguments);
        break;
      case STOP_PIPELINE:
        throw new StageException(errorTemplate, errorArguments);
      case TO_ERROR:
        throw new OnRecordErrorException(record, errorTemplate, errorArguments);
      default: //unknown operation
        LOG.debug("Sending record to error due to unknown operation {}", missingFieldAction);
        throw new OnRecordErrorException(record, errorTemplate, errorArguments);
    }
  }
private void handleError(Record record, Errors errorTemplate, String ... errorArguments) throws StageException {
    switch (missingFieldAction) {
      case DISCARD:
        LOG.debug(errorTemplate.getMessage(), errorArguments);
        break;
      case STOP_PIPELINE:
        throw new StageException(errorTemplate, errorArguments);
      case TO_ERROR:
        throw new OnRecordErrorException(record, errorTemplate, errorArguments);
      default: //unknown operation
        LOG.debug("Sending record to error due to unknown operation {}", missingFieldAction);
        throw new OnRecordErrorException(record, errorTemplate, errorArguments);
    }
  }
private void handleError ( Record record , Errors errorTemplate , String ... errorArguments ) throws StageException { switch ( missingFieldAction ) { case DISCARD : LOG . debug ( errorTemplate . getMessage ( ) , errorArguments ) ; break ; case STOP_PIPELINE : throw new StageException ( errorTemplate , errorArguments ) ; case TO_ERROR : throw new OnRecordErrorException ( record , errorTemplate , errorArguments ) ; default : //unknown operation LOG . debug ( "Sending record to error due to unknown operation {}" , missingFieldAction ) ; throw new OnRecordErrorException ( record , errorTemplate , errorArguments ) ; } }
Handles an error that occurred when processing a record. The error can either be logged or thrown in an exception.

@param record The record which was being processed
@param errorTemplate The error template to be thrown if required
@param errorArguments The error specific arguments
@throws StageException Exception thrown if missingFieldAction indicates to stop the pipeline or send the record
to error. If missingFieldAction value is unknown an exception is also thrown
Handles an error that occurred when processing a record . The error can either be logged or thrown in an exception .