]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Config.pm
imap: require ".$UID_MIN-$UID_END" suffix
[public-inbox.git] / lib / PublicInbox / Config.pm
index c18c9c75b4ffee3a1fb865ca04d8ce6eda01d330..19535beb97385a52a27f6650795d8c0d508c6653 100644 (file)
@@ -105,13 +105,16 @@ sub iterate_start {
        $self->{-iter} = [ \$i, $cb, $arg ];
 }
 
-# for PublicInbox::DS::next_tick
+# for PublicInbox::DS::next_tick, we only call this is if
+# PublicInbox::DS is already loaded
 sub event_step {
        my ($self) = @_;
        my ($i, $cb, $arg) = @{$self->{-iter}};
        my $section = $self->{-section_order}->[$$i++];
        delete($self->{-iter}) unless defined($section);
-       $cb->($self, $section, $arg);
+       eval { $cb->($self, $section, $arg) };
+       warn "E: $@ in ${self}::event_step" if $@;
+       PublicInbox::DS::requeue($self) if defined($section);
 }
 
 sub lookup_newsgroup {