Use exceptions for failed queries.