This method should do several things that query() already does:
- Handle retries if the first query failed due to prior connection loss
- Set the transaction status field via setSessionError()/setTransactionError()
The exception documentation is also missing.