From ce271f82f16ee89a18e7bfc9ed8eab7cbd6f37bc Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Mon, 22 Sep 2025 23:38:21 +0200 Subject: 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. --- src/io.hh | 1 + 1 file changed, 1 insertion(+) (limited to 'src/io.hh') diff --git a/src/io.hh b/src/io.hh index e93b72b..7c21028 100644 --- a/src/io.hh +++ b/src/io.hh @@ -10,6 +10,7 @@ namespace io { enum class ReadError { Error, + Eof, InvalidData, // invalid data read (not used by raw file) MaxTooSmall, // max argument needs to be bigger (not used by raw file) }; -- cgit v1.3