Skip to content

Commit

Permalink
remove unnecessary exception
Browse files Browse the repository at this point in the history
  • Loading branch information
artpaul committed Mar 22, 2020
1 parent 3928e10 commit 4aea38e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
12 changes: 0 additions & 12 deletions clickhouse/base/compressed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,6 @@ CompressedInput::CompressedInput(CodedInputStream* input)
{
}

CompressedInput::~CompressedInput() {
if (!mem_.Exhausted()) {
#if __cplusplus < 201703L
if (!std::uncaught_exception()) {
#else
if (!std::uncaught_exceptions()) {
#endif
throw std::runtime_error("some data was not readed");
}
}
}

size_t CompressedInput::DoNext(const void** ptr, size_t len) {
if (mem_.Exhausted()) {
if (!Decompress()) {
Expand Down
1 change: 0 additions & 1 deletion clickhouse/base/compressed.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ namespace clickhouse {
class CompressedInput : public ZeroCopyInput {
public:
CompressedInput(CodedInputStream* input);
~CompressedInput();

protected:
size_t DoNext(const void** ptr, size_t len) override;
Expand Down

0 comments on commit 4aea38e

Please # to comment.