Give better error messages when port_set.recv fails.

This commit is contained in:
Eric Holk 2012-08-02 15:40:36 -07:00
parent ce6d6511c7
commit 110ff312df

View file

@ -899,7 +899,10 @@ struct port_set<T: send> : recv<T> {
}
fn recv() -> T {
option::unwrap(self.try_recv())
match move self.try_recv() {
some(x) { move x }
none { fail ~"port_set: endpoints closed" }
}
}
pure fn peek() -> bool {