private void outputError(final Exception e, final Severity severity) {
        if (errorReceiverProxy != null && !(e instanceof LoggedException)) {
            try {
                if (e.getMessage() != null) {
                    errorReceiverProxy.log(severity, null, "AnalyticsExecutor", e.getMessage(), e);
                } else {
                    errorReceiverProxy.log(severity, null, "AnalyticsExecutor", e.toString(), e);
                }
            } catch (final RuntimeException e2) {
                // Ignore exception as we generated it.
            }

            if (errorReceiverProxy.getErrorReceiver() instanceof ErrorStatistics) {
                ((ErrorStatistics) errorReceiverProxy.getErrorReceiver()).checkRecord(-1);
            }
        } else {
            LOGGER.error(MarkerFactory.getMarker("FATAL"), e.getMessage(), e);
        }
    }
Used to handle any errors that may occur during translation.
stroom-analytics/stroom-analytics-impl/src/main/java/stroom/analytics/impl/AnalyticErrorWriter.java