private void handleProcessingException(final Throwable e,
                                           final Meta meta) {
        if (e instanceof LoggedException) {
            // The exception has already been logged so ignore it.
            LOGGER.trace(() -> "Error while processing data task: id = " + NullSafe.get(meta, Meta::getId), e);
        } else if (e instanceof IOException
                   || e instanceof RuntimeException) {
            // An exception that's gets here is definitely a failure.
            outputFatalError(e);
        } else if (e instanceof Error err) {
            // If we get here we are into OOM, stackOverflow type critical JVM errors so try to log
            // the failure (if the JVM allows) but re-throw as we should not really be swallowing JVM Errors.
            try {
                LOGGER.error("Error while processing data task: id = {}", NullSafe.get(meta, Meta::getId), e);
                outputFatalError(e);
            } catch (Exception e2) {
                // Error while logging
                LOGGER.error("Error while trying to log error '{}'", e.getMessage(), e2);
            }
            throw err;
        }
    }
Processes a source and writes the result to a target.
stroom-core/src/main/java/stroom/core/dataprocess/AbstractProcessorTaskExecutor.java