public static ProcessException wrap(final String message, final Throwable throwable) {
        if (throwable != null) {
            if (Objects.equals(message, throwable.getMessage())) {
                return wrap(throwable);
            }
            return new ProcessException(new XPathException(message, throwable));
        } else {
            return new ProcessException(new XPathException(message));
        }
    }
Exception used to wrap all exceptions generated within transformation code.
stroom-pipeline/src/main/java/stroom/pipeline/errorhandler/ProcessException.java