Open centromere opened 7 years ago
I think this is the best way to have a "uniform" way of exiting out of calls like receive
. Additionally, it works very well functions like bracket
from Control.Exception
.
The alternative would be to have receive
return the close message, but that:
For sendClose:
If I am closing the connection properly, why should an exception ever be raised? Shouldn't exceptions only be raised for exceptional circumstances?