aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreldritch horrors <pennae@lix.systems>2024-05-03 01:39:07 +0200
committereldritch horrors <pennae@lix.systems>2024-05-07 14:35:20 +0000
commit29f93e1e0d405440b35f1aa7c601dc5f601f9a90 (patch)
tree25b0821b0594415a1a990fd9433fc49c137c2399
parent005b2b61e671e11d0427507883f8ae66e15d939d (diff)
libutil: throw EndOfFile at sourceToSink end
... how has this never broken anything before Change-Id: If3789c02028e8f929481514f63d76b0b46bfc182
-rw-r--r--src/libutil/serialise.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libutil/serialise.cc b/src/libutil/serialise.cc
index 692144b75..a6cc919d2 100644
--- a/src/libutil/serialise.cc
+++ b/src/libutil/serialise.cc
@@ -230,7 +230,7 @@ std::unique_ptr<FinishSink> sourceToSink(std::function<void(Source &)> fun)
if (cur.empty()) {
yield();
if (yield.get()) {
- return (size_t)0;
+ throw EndOfFile("coroutine exhausted");
}
}