class X::Channel::SendOnClosed
class X::Channel::SendOnClosed {}
This exception is thrown when a calling send
on a Channel that has been closed:
my $s = Channel.new;
$s.close;
$s.send(42);
CATCH { default { put .^name, ': ', .Str } };
# OUTPUT: «X::Channel::SendOnClosed: Cannot send a message on a closed channel»
Methods
method channel
method Channel(X::Channel::SendOnClosed:D: --> Channel:D)
Returns the Channel object on which the send
method was called.