Commit 11537156 authored by Max Kellermann's avatar Max Kellermann

input/buffering: rename "read_error" to "error"

The "seek_error" attribute will be eliminated soon.
parent b5c7c16f
...@@ -48,8 +48,8 @@ BufferingInputStream::~BufferingInputStream() noexcept ...@@ -48,8 +48,8 @@ BufferingInputStream::~BufferingInputStream() noexcept
void void
BufferingInputStream::Check() BufferingInputStream::Check()
{ {
if (read_error) if (error)
std::rethrow_exception(read_error); std::rethrow_exception(error);
if (input) if (input)
input->Check(); input->Check();
...@@ -111,8 +111,8 @@ BufferingInputStream::Read(std::unique_lock<Mutex> &lock, void *ptr, size_t s) ...@@ -111,8 +111,8 @@ BufferingInputStream::Read(std::unique_lock<Mutex> &lock, void *ptr, size_t s)
return nbytes; return nbytes;
} }
if (read_error) if (error)
std::rethrow_exception(read_error); std::rethrow_exception(error);
client_cond.wait(lock); client_cond.wait(lock);
} }
...@@ -221,7 +221,7 @@ BufferingInputStream::RunThread() noexcept ...@@ -221,7 +221,7 @@ BufferingInputStream::RunThread() noexcept
try { try {
RunThreadLocked(lock); RunThreadLocked(lock);
} catch (...) { } catch (...) {
read_error = std::current_exception(); error = std::current_exception();
client_cond.notify_all(); client_cond.notify_all();
OnBufferAvailable(); OnBufferAvailable();
} }
......
...@@ -61,7 +61,7 @@ class BufferingInputStream : InputStreamHandler { ...@@ -61,7 +61,7 @@ class BufferingInputStream : InputStreamHandler {
size_t seek_offset; size_t seek_offset;
std::exception_ptr read_error, seek_error; std::exception_ptr error, seek_error;
static constexpr size_t INVALID_OFFSET = ~size_t(0); static constexpr size_t INVALID_OFFSET = ~size_t(0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment