fix issue 30, throw appropriate exception for execute tuple/graph query