libutil: always rethrow kj::CanceledException

the fiber runtime requires this for correctness.

Change-Id: I5ebc6a046596403e86cebaa95962053ff7813877
This commit is contained in:
eldritch horrors
2025-10-20 12:43:22 +00:00
parent bab44b870e
commit 2d2cd7ac03
+3
View File
@@ -4,6 +4,7 @@
#include "async-io.hh"
#include "result.hh"
#include <kj/async.h>
#include <kj/exception.h>
#include <type_traits>
#include <utility>
@@ -79,6 +80,8 @@ inline auto deserializeFrom(AsyncBufferedInputStream & from, auto fn)
} else {
return fn(wrapped);
}
} catch (kj::CanceledException &) { // NOLINT(lix-foreign-exceptions)
throw; // NOLINT(lix-foreign-exceptions): fiber invariants require this
} catch (...) {
return result::current_exception();
}