1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 08:31:16 +02:00

Make abort() call sites log first

This commit is contained in:
Robert Hensing 2024-07-20 22:46:09 +02:00
parent e48e0cbab0
commit 3172e88af5
35 changed files with 88 additions and 45 deletions

View file

@ -260,7 +260,7 @@ std::unique_ptr<FinishSink> sourceToSink(std::function<void(Source &)> fun)
});
}
if (!*coro) { abort(); }
if (!*coro) { unreachable(); }
if (!cur.empty()) {
CoroutineContext ctx;
@ -271,12 +271,12 @@ std::unique_ptr<FinishSink> sourceToSink(std::function<void(Source &)> fun)
void finish() override
{
if (!coro) return;
if (!*coro) abort();
if (!*coro) unreachable();
{
CoroutineContext ctx;
(*coro)(true);
}
if (*coro) abort();
if (*coro) unreachable();
}
};
@ -316,7 +316,7 @@ std::unique_ptr<Source> sinkToSource(
});
}
if (!*coro) { eof(); abort(); }
if (!*coro) { eof(); unreachable(); }
if (pos == cur.size()) {
if (!cur.empty()) {