presto-benchmark-driver/src/main/java/io/prestosql/benchmark/driver/BenchmarkQueryRunner.java/BenchmarkQueryRunner/getCause
class BenchmarkQueryRunner:    private static RuntimeException getCause(QueryError queryError)
    {
        if (queryError.getFailureInfo() != null) {
            return queryError.getFailureInfo().toException();
        }
        return null;
    }