Found a cleaner way to throw the exceptions on query failures.