raise query error with query in it