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

=TITLE class X::Proc::Async::MustBeStarted

=SUBTITLE Error due to interacting with a Proc::Async stream before spawning its process

    class X::Proc::Async::MustBeStarted is Exception {}

Several methods from L<Proc::Async|/type/Proc::Async> expect that the external program has been
spawned (by calling C<.start> on it), including C<say>, C<write>, C<print> and
C<close-stdin>. If one of those methods is called before C<.start> was called,
they throw an exception of type C<X::Proc::Async::MustBeStarted>.

    Proc::Async.new('echo', :w).say(42);
    CATCH { default { put .^name, ': ', .Str } };
    # OUTPUT: «X::Proc::Async::MustBeStarted: Process must be started first before calling 'say'␤»

=head1 Methods

=head2 method method

    method method(X::Proc::Async::MustBeStarted:D --> Str:D)

Returns the name of the method that was illegally called before starting the
external program.

=end pod
