Skip to content
Permalink
Browse files

Upgrade exception handler environment variables

- remove RAKUDO_EXCEPTIONS_HANDLER
  - it was to be removed with 2019.07, to be really gone with 2019.12
- make PERL6_EXCEPTIONS_HANDLER now deprecated
  - to be removed a year from now, 2020.11 (or later of course)
- add support for RAKU_EXCEPTIONS_HANDLER
  • Loading branch information
lizmat committed Dec 14, 2019
1 parent f722715 commit 90408d18443bdc19861f8dfcc8a51488242bf69c
Showing with 8 additions and 8 deletions.
  1. +8 −8 src/core.c/Exception.pm6
@@ -376,24 +376,24 @@ do {
my Mu $ex := nqp::atpos(nqp::p6argvmarray(), 0);
my $e := EXCEPTION($ex);

if %*ENV<RAKUDO_EXCEPTIONS_HANDLER> -> $handler {
# REMOVE DEPRECATED CODE ON 201907
Rakudo::Deprecations.DEPRECATED: "PERL6_EXCEPTIONS_HANDLER", Nil,
'2019.07', :file("N/A"), :line("N/A"),
:what("RAKUDO_EXCEPTIONS_HANDLER env var");
if %*ENV<PERL6_EXCEPTIONS_HANDLER> -> $handler {
# REMOVE DEPRECATED CODE ON 202011
Rakudo::Deprecations.DEPRECATED: "RAKU_EXCEPTIONS_HANDLER", Nil,
'2020.11', :file("N/A"), :line("N/A"),
:what("PERL6_EXCEPTIONS_HANDLER env var");
my $class := ::("Exceptions::$handler");
unless nqp::istype($class,Failure) {
temp %*ENV<RAKUDO_EXCEPTIONS_HANDLER> = ""; # prevent looping
temp %*ENV<PERL6_EXCEPTIONS_HANDLER> = ""; # prevent looping
unless $class.process($e) {
nqp::getcurhllsym('&THE_END')();
return
}
}
}
if %*ENV<PERL6_EXCEPTIONS_HANDLER> -> $handler {
if %*ENV<RAKU_EXCEPTIONS_HANDLER> -> $handler {
my $class := ::("Exceptions::$handler");
unless nqp::istype($class,Failure) {
temp %*ENV<PERL6_EXCEPTIONS_HANDLER> = ""; # prevent looping
temp %*ENV<RAKU_EXCEPTIONS_HANDLER> = ""; # prevent looping
unless $class.process($e) {
nqp::getcurhllsym('&THE_END')();
return

0 comments on commit 90408d1

Please sign in to comment.
You can’t perform that action at this time.