about summary refs log tree commit homepage
path: root/lib/PublicInbox/LeiNoteEvent.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-09-21 07:41:51 +0000
committerEric Wong <e@80x24.org>2021-09-21 19:18:35 +0000
commit387f0e693f9e22a7698927bb40dab0742738e8a6 (patch)
tree19a52cf42c123cbd660e2dc14a3e2b0b22dca8c5 /lib/PublicInbox/LeiNoteEvent.pm
parent8eaa877179910dce156179e9025d1e0df34089d8 (diff)
downloadpublic-inbox-387f0e693f9e22a7698927bb40dab0742738e8a6.tar.gz
We can set opt->{quiet} for (internal) 'note-event' command
to quiet ->qerr, since we use ->qerr everywhere else.  And
we'll just die() instead of setting a ->{fail} message, since
eval + die are more inline with the rest of our Perl code.
Diffstat (limited to 'lib/PublicInbox/LeiNoteEvent.pm')
-rw-r--r--lib/PublicInbox/LeiNoteEvent.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/PublicInbox/LeiNoteEvent.pm b/lib/PublicInbox/LeiNoteEvent.pm
index a0591a09..43d5ed0f 100644
--- a/lib/PublicInbox/LeiNoteEvent.pm
+++ b/lib/PublicInbox/LeiNoteEvent.pm
@@ -68,8 +68,9 @@ sub lei_note_event {
         return flush_lei($lei) if $folder eq 'done'; # special case
         my $lms = $lei->lms or return;
         $lms->lms_write_prepare if $new_cur eq ''; # for ->clear_src below
-        my $err = $lms->arg2folder($lei, [ $folder ]);
-        return if $err->{fail};
+        $lei->{opt}->{quiet} = 1;
+        eval { $lms->arg2folder($lei, [ $folder ]) };
+        return if $@;
         my $state = $cfg->get_1("watch.$folder", 'state') // 'tag-rw';
         return if $state eq 'pause';
         return $lms->clear_src($folder, \$bn) if $new_cur eq '';