From a845ddff5ac0a1ea3a85836554b6901554cf839d Mon Sep 17 00:00:00 2001 From: dakkar Date: Sun, 29 Dec 2019 11:29:01 +0000 Subject: warn exceptions' normal stringification, not their `.perl` --- lib/MaildirIndexer/Parser.pm6 | 2 +- lib/MaildirIndexer/ScanDir.pm6 | 2 +- lib/MaildirIndexer/Store.pm6 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/MaildirIndexer/Parser.pm6 b/lib/MaildirIndexer/Parser.pm6 index 93d5f3f..1aa658b 100644 --- a/lib/MaildirIndexer/Parser.pm6 +++ b/lib/MaildirIndexer/Parser.pm6 @@ -101,7 +101,7 @@ multi parse-email(IO::Socket::Async:D $s --> MaildirIndexer::Email) is export { multi parse-email(Str:D $email-str, :$path = IO --> MaildirIndexer::Email) is export { my MaildirIndexer::Email $result; MaildirIndexer::LogTimelineSchema::Parse::Email::Str.log: -> { - CATCH { warn .perl; return Nil }; + CATCH { warn $_; return Nil }; with Message.parse($email-str,:actions(Message-actions.new(:$path))) { $result = .made; } diff --git a/lib/MaildirIndexer/ScanDir.pm6 b/lib/MaildirIndexer/ScanDir.pm6 index a8dfe97..b21fd81 100644 --- a/lib/MaildirIndexer/ScanDir.pm6 +++ b/lib/MaildirIndexer/ScanDir.pm6 @@ -8,7 +8,7 @@ sub scan-dir(IO() $path --> Supply) is export { sub add-dir(IO::Path $dir, :$initial) { %watched-dirs{$dir} = True; - CATCH { when X::IO::Dir { }; default { warn .perl } } + CATCH { when X::IO::Dir { }; default { warn $_ } } whenever $dir.watch { my $path-io = .path.IO; diff --git a/lib/MaildirIndexer/Store.pm6 b/lib/MaildirIndexer/Store.pm6 index 5339bf3..502d60e 100644 --- a/lib/MaildirIndexer/Store.pm6 +++ b/lib/MaildirIndexer/Store.pm6 @@ -18,7 +18,7 @@ method dump(--> Nil) { method start(--> Nil) { for ^$.workers { start react { - CATCH { warn .perl }; + CATCH { warn $_ }; whenever $.file-channel -> $file { if $file.e && $file.f { MaildirIndexer::LogTimelineSchema::Store::Add.log: :file($file.path), -> { -- cgit v1.2.3