diff --git a/Changes b/Changes index f89d673..b2588d8 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,13 @@ Revision history for Perl module Promise::ES6 +0.27 +- Tweak AWAIT_GET to conform to Awaitable 0.65 test suite, which added + a new requirement for error reporting. Errors will now “come from” + whatever calls AWAIT_GET rather than AWAIT_GET’s internals. + (cf. https://rt.cpan.org/Public/Bug/Display.html?id=147276) +- Report Awaitable test version, so we can more easily diagnose + issues like the Awaitable 0.65 change. + 0.26 Sun 8 Jan 2023 - (No production changes.) - Skip async/await tests on DEBUGGING perls (fixes CPAN Testers). diff --git a/lib/Promise/ES6/Backend/PP.pm b/lib/Promise/ES6/Backend/PP.pm index f57af54..d16bcdc 100644 --- a/lib/Promise/ES6/Backend/PP.pm +++ b/lib/Promise/ES6/Backend/PP.pm @@ -7,6 +7,8 @@ package Promise::ES6; use strict; use warnings; +use Carp (); + use constant { # These aren’t actually defined. @@ -402,7 +404,7 @@ sub AWAIT_GET { return ${ $_[0]->[_VALUE_SR_IDX] } if UNIVERSAL::isa( $_[0]->[_VALUE_SR_IDX], _RESOLUTION_CLASS ); - die ${ $_[0]->[_VALUE_SR_IDX] }; + Carp::croak ${ $_[0]->[_VALUE_SR_IDX] }; } use constant _noop => ();