# New Ticket Created by  Simon Ruderich 
# Please include the string:  [perl #127565]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=127565 >


Hello,

The following sample exhibits the problem:

    my $p = run 'false', :out;

    my $out = $p.out.slurp-rest;
    try { $p.out.close; }; # still results in exception
    #try { $p.out.close; CATCH { default { say "died"; } }; }; # works

    say "STDOUT: {$out}";

This results in:

    The spawned process exited unsuccessfully (exit code: 1)
    in block <unit> at test.p6 line 4

I'd except the first try to catch the error message. The second
catches it, however I've no idea why it works.

perl6 --version says:

    This is Rakudo version 2016.01.1 built on MoarVM version
    2016.01 implementing Perl 6.c.

Regards
Simon
-- 
+ privacy is necessary
+ using gnupg http://gnupg.org
+ public key id: 0x92FEFDB7E44C32F9

Attachment: signature.asc
Description: PGP signature

Reply via email to