public int getRoughCountExceptions() {
        int ret = 0;
        for (FileResourceConsumer consumer : consumersManager.getConsumers()) {
            ret += consumer.getNumHandledExceptions();
        }
        return ret;
    }
This returns a rough (unsynchronized) count of caught/handled exceptions.

@return rough count of exceptions
tika-batch/src/main/java/org/apache/tika/batch/StatusReporter.java