@Override
    public String getMessage() {
        for (final Severity severity : statsMap.keySet()) {
            final StoredErrorStats stats = statsMap.get(severity);
            if (stats != null) {
                final StoredError error = stats.getCurrentError();
                if (error != null) {
                    return error.toString();
                }
            }
        }

        return null;
    }
Flags records that contain errors so that the RecordOutputFilter can exclude
them from the output.
stroom-pipeline/src/main/java/stroom/pipeline/errorhandler/RecordErrorReceiver.java