Fix bug about throw exception
Merge pull request #2745 from dreamsxin/query_excetion

Fix bug about throw exception