diff options
Diffstat (limited to 'lib/MaildirIndexer/Store.pm6')
-rw-r--r-- | lib/MaildirIndexer/Store.pm6 | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/MaildirIndexer/Store.pm6 b/lib/MaildirIndexer/Store.pm6 index 2c60233..dbe2343 100644 --- a/lib/MaildirIndexer/Store.pm6 +++ b/lib/MaildirIndexer/Store.pm6 @@ -17,6 +17,7 @@ method dump() { method start() { for ^10 { start react { + CATCH { warn .perl }; whenever $.file-channel -> $file { if $file.e && $file.f { self.add-file($file); @@ -31,7 +32,8 @@ method start() { method add-file(IO:D $file) { my $mailbox = mailbox-from-path($file.path) or return; - my $email = parse-email($file,:headers-only); + my $email = parse-email($file,:headers-only) or return; + CATCH { warn .perl }; $!lock.protect: { .add-mail($email,$mailbox) for @!indices; } |