public static <T, U> Function<T, U> wrapFunction(final ThrowingFunction<T, U> functionThatThrows) {
        return (a) -> {
            try {
                return functionThatThrows.apply(a);
            } catch (RuntimeException e) {
                throw e;
            } catch (Exception e) {
                throw new RuntimeException(e);
            }
        };
    }
@author Stephen Mallette (http://stephen.genoprime.com)
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/util/function/FunctionUtils.java