libutil: always rethrow kj::CanceledException
the fiber runtime requires this for correctness. Change-Id: I5ebc6a046596403e86cebaa95962053ff7813877
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user