method fail
Documentation for method fail assembled from the following types:
class Exception
From Exception
(Exception) method fail
Defined as:
multi sub fail(*)multi sub fail(Exception )method fail(Exception:)
Exits the calling Routine and returns a Failure object wrapping the exception $e - or, for the *@text form, an X::AdHoc exception constructed from the concatenation of @text. If the caller activated fatal exceptions via the pragma use fatal;, the exception is thrown instead of being returned as a Failure.
sub copy-directory-tree ()
class Channel
From Channel
(Channel) method fail
Defined as:
method fail(Channel: )
Closes the Channel (that is, makes subsequent send calls die), and enqueues the error to be thrown as the final element in the channel. Method receive will throw that error as an exception. Does nothing if the channel has already been closed or .fail has already been called on it.
my = Channel.new;.fail("Bad error happens!");.receive;CATCH ;# OUTPUT: «X::AdHoc: Bad error happens!»