class X::Channel::SendOnClosed

Error due to calling send on a closed channel
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.

The Camelia image is copyright 2009 by Larry Wall. "Raku" is a trademark of the Yet Another Society. All rights reserved.

Built with Podlite — the markup and publishing tools behind this site.