=begin pod :kind("Type") :subkind("class") :category("exception")

=TITLE class X::Channel::SendOnClosed

=SUBTITLE Error due to calling send on a closed channel

    class X::Channel::SendOnClosed {}

This exception is thrown when a calling C<send> on a L<Channel|/type/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␤»

=head1 Methods

=head2 method channel

    method Channel(X::Channel::SendOnClosed:D: --> Channel:D)

Returns the Channel object on which the C<send> method was called.

=end pod
