Throw exceptions when query fails to evaluate