diff --git a/lix/libutil/async.hh b/lix/libutil/async.hh index 4c4e07a6f..a78b241da 100644 --- a/lix/libutil/async.hh +++ b/lix/libutil/async.hh @@ -121,6 +121,11 @@ T runAsyncUnwrap(Result t) } catch (::nix::BaseException & e) { \ e.addAsyncTrace(::std::source_location::current(), _l_ctx()); \ throw; \ + /* NOLINTNEXTLINE(lix-foreign-exceptions) */ \ + } catch (::kj::Exception & e) { \ + ::nix::Error fe{e.getDescription().cStr()}; \ + fe.addAsyncTrace(::std::source_location::current(), _l_ctx()); \ + throw fe; \ } catch (...) { \ auto fe = ::nix::ForeignException::wrapCurrent(); \ fe.addAsyncTrace(::std::source_location::current(), _l_ctx()); \