Added QueryException

Added QueryExceptions to Query and Queries