mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-28 10:31:57 +00:00
Merge pull request #58165 from azat/s3-passthrough-exception
Pass through exceptions for reading from S3
This commit is contained in:
commit
a400657155
@ -34,6 +34,11 @@ bool ReadBufferFromIStream::nextImpl()
|
||||
ReadBufferFromIStream::ReadBufferFromIStream(std::istream & istr_, size_t size)
|
||||
: BufferWithOwnMemory<ReadBuffer>(size), istr(istr_)
|
||||
{
|
||||
/// - badbit will be set if some exception will be throw from ios implementation
|
||||
/// - failbit can be set when for instance read() reads less data, so we
|
||||
/// cannot set it, since we are requesting to read more data, then the
|
||||
/// buffer has now.
|
||||
istr.exceptions(std::ios::badbit);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -196,7 +196,7 @@ bool ReadBufferFromS3::nextImpl()
|
||||
next_result = impl->next();
|
||||
break;
|
||||
}
|
||||
catch (Exception & e)
|
||||
catch (Poco::Exception & e)
|
||||
{
|
||||
if (!processException(e, getPosition(), attempt) || last_attempt)
|
||||
throw;
|
||||
|
Loading…
Reference in New Issue
Block a user