code: public static QueryRuntimeException fromThrowable(Throwable t) {
      return (t instanceof QueryRuntimeException)
                     ? (QueryRuntimeException) t
                     : new QueryRuntimeException(t);
    }
docs: Converts a Throwable to a QueryRuntimeException. If the Throwable is a QueryRuntimeException,
  it will be passed through unmodified; otherwise, it will be wrapped in a new
  QueryRuntimeException.
  
  @param t the Throwable to convert
  
  @return a QueryRuntimeException