@Field
    public void setOnParseException(String onParseException) throws TikaConfigException {
        if ("skip".equalsIgnoreCase(onParseException)) {
            setOnParseException(FetchEmitTuple.ON_PARSE_EXCEPTION.SKIP);
        } else if ("emit".equalsIgnoreCase(onParseException)) {
            setOnParseException(FetchEmitTuple.ON_PARSE_EXCEPTION.EMIT);
        } else {
            throw new TikaConfigException("must be either 'skip' or 'emit': " + onParseException);
        }
    }
Abstract class that handles the testing for timeouts/thread safety
issues.  Concrete classes implement the blocking {@link #enqueue()}.
If there's an exception in the enqueuing thread, this will throw
a RuntimeException.  It will throw an IllegalStateException if
next() is called after hasNext() has returned false.
tika-core/src/main/java/org/apache/tika/pipes/pipesiterator/PipesIterator.java