private void outputError(final Throwable e, final Severity severity) {
        if (errorReceiverProxy != null && !(e instanceof LoggedException)) {
            try {
                if (e.getMessage() != null) {
                    errorReceiverProxy.log(severity, null, "PipelineStreamProcessor", e.getMessage(), e);
                } else {
                    errorReceiverProxy.log(severity, null, "PipelineStreamProcessor", e.toString(), e);
                }
            } catch (final RuntimeException e2) {
                // Ignore exception as we generated it.
                LOGGER.error("Error while trying to log {} to errorReceiverProxy with message '{}'",
                        severity, e.getMessage(), e2);
            }

            if (errorReceiverProxy.getErrorReceiver() instanceof ErrorStatistics errorStatistics) {
                errorStatistics.checkRecord(-1);
            }

            if (streamSource.getMeta() != null) {
                LOGGER.trace(() -> "Error while processing data task: id = " + streamSource.getMeta().getId(), e);
            }
        } else {
            LOGGER.error(MarkerFactory.getMarker("FATAL"), e.getMessage(), e);
        }
    }
Used to handle any errors that may occur during translation.
stroom-core/src/main/java/stroom/core/dataprocess/AbstractProcessorTaskExecutor.java