Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
sub no-catch-control {
die "no-catch-control exception";
}
sub catch-control {
CONTROL {
say "CONTROL: {$_.gist}";
die "control exception";
}
die "catch-control exception";
}
say "**** no catch control ****";
for 1 {
no-catch-control;
CATCH {
say "EXCEPTION: {$_.gist}";
next;
}
}
say "**** WITH catch control, dies upon 'next' in CATCH ****";
for 1 {
catch-control;
CATCH {
say "EXCEPTION: {$_.gist}";
next;
}
}
Unhandled exception: Missing or wrong version of dependency 'gen/moar/stage2/QRegex.nqp' (from 'src/Perl6/Pod.nqp')
at <unknown>:1 (blib/Perl6/Pod.moarvm:<dependencies+deserialize>)
from src/vm/moar/ModuleLoader.nqp:51 (/home/awwaiid/.rakudobrew/moar-2016.07.1/install/share/nqp/lib/ModuleLoader.moarvm:)
from src/vm/moar/ModuleLoader.nqp:41 (/home/awwaiid/.rakudobrew/moar-2016.07.1/install/share/nqp/lib/ModuleLoader.moarvm:load_module)
from <unknown>:1 (blib/Perl6/Actions.moarvm:<dependencies+deserialize>)
from src/vm/moar/ModuleLoader.nqp:51 (/home/awwaiid/.rakudobrew/moar-2016.07.1/install/share/nqp/lib/ModuleLoader.moarvm:)
from src/vm/moar/ModuleLoader.nqp:41 (/home/awwaiid/.rakudobrew/moar-2016.07.1/install/share/nqp/lib/ModuleLoader.moarvm:load_module)
from <unknown>:1 (blib/Perl6/Grammar.moarvm:<dependencies+deserialize>)
from src/vm/moar/ModuleLoader.nqp:51 (/home/awwaiid/.rakudobrew/moar-2016.07.1/install/share/nqp/lib/ModuleLoader.moarvm:)
from src/vm/moar/ModuleLoader.nqp:41 (/home/awwaiid/.rakudobrew/moar-2016.07.1/install/share/nqp/lib/ModuleLoader.moarvm:load_module)
from <unknown>:1 (/home/awwaiid/.rakudobrew/moar-2016.07.1/install/share/perl6/runtime/perl6.moarvm:<dependencies+deserialize>)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.