T M
class X::ControlFlow::Return
Error ReportCollection examples

Error due to calling return outside a routine

class X::ControlFlow::Return is X::ControlFlow { }

Thrown when a return is called from outside a routine.

return;
CATCH { default { put .^name''.Str } };
# OUTPUT: «X::ControlFlow::Return: Attempt to return outside of any Routine␤»