Rob Foehl
unread,Nov 16, 2017, 2:23:27 AM11/16/17Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mojol...@googlegroups.com
Just ran into this on 7.55:
╶➤ perl -MMojo::Promise -le 'my $p = Mojo::Promise->new; $p->reject("die, please"); $p->catch(sub { die "oops: $_[0]\n" }); $p->wait'
Silence... Change the die to a warn, and:
╶➤ perl -MMojo::Promise -le 'my $p = Mojo::Promise->new; $p->reject("die, please"); $p->catch(sub { warn "oops: $_[0]\n" }); $p->wait'
oops: die, please
The promise is correctly rejected (confirmed by poking at $p->{status}),
but the exception disappears. I'm guessing that wasn't the intent, but
I'm not entirely sure after a brief glance at the implementation...
-Rob