File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -187,6 +187,17 @@ printing a backtrace along with the message:
187
187
die X::WithoutLineNumber.new(payload => "message")
188
188
# prints "message\n" to $*ERR and exits, no backtrace
189
189
190
+ = head1 Control Exceptions
191
+
192
+ Control exceptions are thrown by certain L < keywords|/language/phasers#CONTROL >
193
+ and are handled either automatically or by the appropriate
194
+ L < phaser|/language/phasers#Loop_Phasers > . Any unhandled control exception is
195
+ converted to a normal exception.
196
+
197
+ { return; CATCH { default { say .^name, ': ',.Str } } }
198
+ # OUTPUT « X::ControlFlow::Return: Attempt to return outside of any Routine »
199
+ # was CX::Return
200
+
190
201
= end pod
191
202
192
203
# vim: expandtab shiftwidth=4 ft=perl6
You can’t perform that action at this time.
0 commit comments