Give better error messages when port_set.recv fails.
This commit is contained in:
parent
ce6d6511c7
commit
110ff312df
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user