raise error upon empty queue