]> Sergey Matveev's repositories - public-inbox.git/commitdiff
searchidx: v1: raise on msgmap init failure
authorEric Wong <e@80x24.org>
Sat, 23 Oct 2021 19:08:41 +0000 (19:08 +0000)
committerEric Wong <e@80x24.org>
Sat, 23 Oct 2021 21:53:53 +0000 (21:53 +0000)
Indexing any inboxes requires SQLite and msgmap, so don't hide
exceptions if it fails.

lib/PublicInbox/SearchIdx.pm

index 585f28f5d882431d0556bd5e11e6c037c4321320..b886ce789b7943dfb5eb2c248bb62c6329e36acc 100644 (file)
@@ -451,7 +451,7 @@ sub add_xapian ($$$$) {
 sub _msgmap_init ($) {
        my ($self) = @_;
        die "BUG: _msgmap_init is only for v1\n" if $self->{ibx}->version != 1;
-       $self->{mm} //= eval {
+       $self->{mm} //= do {
                require PublicInbox::Msgmap;
                PublicInbox::Msgmap->new_file($self->{ibx}, 1);
        };