raise error if search block is not provided with one or two block variables