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

The "seek_error" attribute will be eliminated soon.
This commit is contained in:
Max Kellermann 2019-05-17 11:29:19 +02:00
parent b5c7c16fb4
commit 1153715608
2 changed files with 6 additions and 6 deletions

View File

@ -48,8 +48,8 @@ BufferingInputStream::~BufferingInputStream() noexcept
void
BufferingInputStream::Check()
{
if (read_error)
std::rethrow_exception(read_error);
if (error)
std::rethrow_exception(error);
if (input)
input->Check();
@ -111,8 +111,8 @@ BufferingInputStream::Read(std::unique_lock<Mutex> &lock, void *ptr, size_t s)
return nbytes;
}
if (read_error)
std::rethrow_exception(read_error);
if (error)
std::rethrow_exception(error);
client_cond.wait(lock);
}
@ -221,7 +221,7 @@ BufferingInputStream::RunThread() noexcept
try {
RunThreadLocked(lock);
} catch (...) {
read_error = std::current_exception();
error = std::current_exception();
client_cond.notify_all();
OnBufferAvailable();
}

View File

@ -61,7 +61,7 @@ class BufferingInputStream : InputStreamHandler {
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);