Skip Menu |
Report information
Id: 126787
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: juerd [at] tnx.nl
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: Call to method that does not exist in a Promise
Date: Wed, 2 Dec 2015 20:14:03 +0100
From: "Juerd Waalboer" <juerd [...] tnx.nl>
To: rakudobug [...] perl.org
Download (untitled) / with headers
text/plain 271b
use v6; my $foo; my $promise = Promise.new; $promise.then: { note 41; $foo.does-not-exist; # hangs? thread dies? no error message! note 42; # never reached! }; $promise.keep; # no difference with break sleep 60;
Download (untitled) / with headers
text/plain 531b
Try with this slightly different code to see that it's not about "calling to methods inside promises", just about an exception in a Promise that nobody is interested in (no await, no .then, ...) are silently nommed: use v6; my $foo; my $promise = Promise.new; $promise.keep; # no difference with break # note i added an "await" here. await $promise.then: { note 41; $foo.does-not-exist; # hangs? thread dies? no error message! note 42; # never reached! }; sleep 5;
RT-Send-CC: perl6-compiler [...] perl.org
Download (untitled) / with headers
text/plain 1.2k
On Wed, 02 Dec 2015 13:52:24 -0800, timo wrote: Show quoted text
> just about an exception in a > Promise that nobody is interested in (no await, no .then, ...) are > silently nommed:
This version has a `.then` but doesn't explode. Is it meant to then? use v6; my $foo; my $promise = Promise.new; $promise.keep; # no difference with break # note i added an "await" here. $promise.then({ note 41; $foo.does-not-exist; # hangs? thread dies? no error message! note 42; # never reached! }).then: { say "hi" }; sleep 5; And this one explodes, but there's no location shown for where the error occurs: use v6; my $foo; my $promise = Promise.new; $promise.keep; # no difference with break # note i added an "await" here. await $promise.then({ note 41; $foo.does-not-exist; # hangs? thread dies? no error message! note 42; # never reached! }); sleep 5; # zoffix@VirtualBox:~/CPANPRC/rakudo$ ./perl6 test.p6 41 # ===SORRY!=== # No such method 'does-not-exist' for invocant of type 'Any' # zoffix@VirtualBox:~/CPANPRC/rakudo$ This is Rakudo version 2016.11-220-g29b228c built on MoarVM version 2016.11-41-gd2139b5


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org