Skip to content

Instantly share code, notes, and snippets.

@gfldex
Created November 15, 2016 10:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gfldex/84af33884d323f16c83abc225e474cc9 to your computer and use it in GitHub Desktop.
Save gfldex/84af33884d323f16c83abc225e474cc9 to your computer and use it in GitHub Desktop.
use v6;
CATCH { default { say .^name; say .Str } }
# say qx{find / -print}.lines;
# if qx{} steps onto malformed utf8: Unable to read from 'find / -print'
# exit 0;
my $find = Proc::Async.new(|<find / -print>);
$find.stdout.tap(-> $line {
CATCH { default { say .^name } }
print $line
});
$find.stderr.tap(-> $line {
CATCH { default { say .^name } }
# put "FAIL: $line"
});
my $promise = $find.start;
await $promise;
@gfldex
Copy link
Author

gfldex commented Nov 15, 2016

/mnt/storage/media/mods/WAI-Unhandled exception in code scheduled on thread 3
Malformed UTF-8
in any at /usr/local/src/rakudo/install/share/perl6/runtime/CORE.setting.moarvm line 1
in method consume-available-chars at /usr/local/src/rakudo/install/share/perl6/runtime/CORE.setting.moarvm line 1
in block at /usr/local/src/rakudo/install/share/perl6/runtime/CORE.setting.moarvm line 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment