diff options
| author | Joel Klinghed <the_jk@spawned.biz> | 2025-09-22 23:38:21 +0200 |
|---|---|---|
| committer | Joel Klinghed <the_jk@spawned.biz> | 2025-09-22 23:38:21 +0200 |
| commit | ce271f82f16ee89a18e7bfc9ed8eab7cbd6f37bc (patch) | |
| tree | 3e568faf83ae750aa244cca87b55951c7401ef03 /src/gen_ugc.cc | |
| parent | 50348284f5d82ccfd65b0c803ba0ba895912ceff (diff) | |
Change io::Reader and company to return ReadError::Eof instead of 0.
It's debatable if Eof should be considered an error or not.
But it is pretty clear it generally is a special response that
needs special handling, so easier to keep with the unexpected lot.
Also keeps better at higher abstraction levels, such as the line
reader.
Diffstat (limited to 'src/gen_ugc.cc')
| -rw-r--r-- | src/gen_ugc.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gen_ugc.cc b/src/gen_ugc.cc index bc7c91b..2670803 100644 --- a/src/gen_ugc.cc +++ b/src/gen_ugc.cc @@ -151,6 +151,8 @@ std::string_view ioerr2str(io::ReadError error) { return "Fatal error"; case io::ReadError::MaxTooSmall: return "Too small buffer"; + case io::ReadError::Eof: + return "Unexpected end of file"; } std::unreachable(); } |
