We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 628efba commit 98ef33cCopy full SHA for 98ef33c
doc/Language/control.pod6
@@ -700,6 +700,16 @@ All these forms may produce a return value the same way C<loop> does.
700
701
Same as C<return>, but returns a writable container.
702
703
+=head1 X<fail|control flow>
704
+
705
+Leaves the current routine and returns the provided
706
+L<Exception|/type/Exception> or C<Str> wrapped inside a
707
+L<Failure|/type/Failure>.
708
709
+ sub f { "WELP!" };
710
+ dd f;
711
+ # OUTPUT«Failure.new(exception => X::AdHoc.new(payload => "wut?"), backtrace => Backtrace.new)»
712
713
=head1 X<once|control flow>
714
715
A block prefix with C<once> will be executed exactly once, even if placed inside a
0 commit comments