private static boolean contains(final Throwable e,
                                    final Class<? extends Throwable> clazz) {
        return e != null
               && clazz != null
               && (
                       clazz.isAssignableFrom(e.getClass())
                       || ExceptionUtils.indexOfThrowable(e, clazz) >= 0);
    }
@return True if e is of type clazz or a throwable in its cause chain is of type clazz.
stroom-pipeline/src/main/java/stroom/pipeline/errorhandler/ProcessException.java