]> git.ipfire.org Git - thirdparty/public-inbox.git/commit
ipc: improve exception handling
authorEric Wong <e@80x24.org>
Sun, 7 Sep 2025 23:41:44 +0000 (23:41 +0000)
committerEric Wong <e@80x24.org>
Wed, 10 Sep 2025 23:05:57 +0000 (23:05 +0000)
commit2baa916e55b234aefa7ac4c9060f91937dea6fe3
tree66a160ed767ba1c6ba98f891851f2890fd795684
parentd1cc3ce8c056001eda5677c90be2900e14c1ed52
ipc: improve exception handling

When an exception triggers a teardown of the worker process
(ipc_worker_stop), we need to combine subsequent exceptions and
show the original one, first.  In other words, we must not lose
the original exception if new exceptions are thrown during
teardown.

So rely on `wantarray' to grab caller contexts to allow
returning exceptions as a list rather than throwing them
immediately.
lib/PublicInbox/IPC.pm