class X::ControlFlow is Exception { }

Thrown when a control flow construct (such as next or redo) is called outside the dynamic scope of an enclosing construct that is supposed to catch them.

For example

CATCH { default { put .^name''.Str } };
# OUTPUT: «X::ControlFlow: last without loop construct␤»


method illegal§

method illegal returns Str:D

Returns the name of the control flow command that was called.

method enclosing§

method enclosing returns Str:D

Returns the name of the missing enclosing construct.


Type relations for X::ControlFlow
raku-type-graph X::ControlFlow X::ControlFlow Exception Exception X::ControlFlow->Exception Mu Mu Any Any Any->Mu Exception->Any X::ControlFlow::Return X::ControlFlow::Return X::ControlFlow::Return->X::ControlFlow

Expand chart above