From 138b74aa3bbd95bfa5bb31c9e309e10c0587c8a5 Mon Sep 17 00:00:00 2001 From: Nikita Mikhailov Date: Wed, 23 Dec 2020 01:04:02 +0300 Subject: [PATCH] better --- src/DataStreams/NativeBlockInputStream.cpp | 2 +- src/DataTypes/DataTypeFixedString.cpp | 2 +- src/IO/ReadBuffer.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/DataStreams/NativeBlockInputStream.cpp b/src/DataStreams/NativeBlockInputStream.cpp index e9967e88638..b182d5e0588 100644 --- a/src/DataStreams/NativeBlockInputStream.cpp +++ b/src/DataStreams/NativeBlockInputStream.cpp @@ -83,7 +83,7 @@ void NativeBlockInputStream::readData(const IDataType & type, IColumn & column, type.deserializeBinaryBulkWithMultipleStreams(column, rows, settings, state); if (column.size() != rows) - throw ParsingException("Cannot read all data in NativeBlockInputStream. Rows read: " + toString(column.size()) + ". Rows expected: " + toString(rows) + ".", + throw Exception("Cannot read all data in NativeBlockInputStream. Rows read: " + toString(column.size()) + ". Rows expected: " + toString(rows) + ".", ErrorCodes::CANNOT_READ_ALL_DATA); } diff --git a/src/DataTypes/DataTypeFixedString.cpp b/src/DataTypes/DataTypeFixedString.cpp index c0b684cfcd9..585c5709be7 100644 --- a/src/DataTypes/DataTypeFixedString.cpp +++ b/src/DataTypes/DataTypeFixedString.cpp @@ -103,7 +103,7 @@ void DataTypeFixedString::deserializeBinaryBulk(IColumn & column, ReadBuffer & i size_t read_bytes = istr.readBig(reinterpret_cast(&data[initial_size]), max_bytes); if (read_bytes % n != 0) - throw ParsingException("Cannot read all data of type FixedString. Bytes read:" + toString(read_bytes) + ". String size:" + toString(n) + ".", + throw Exception("Cannot read all data of type FixedString. Bytes read:" + toString(read_bytes) + ". String size:" + toString(n) + ".", ErrorCodes::CANNOT_READ_ALL_DATA); data.resize(initial_size + read_bytes); diff --git a/src/IO/ReadBuffer.h b/src/IO/ReadBuffer.h index 08f1bc2a3bb..3d6eb6970ce 100644 --- a/src/IO/ReadBuffer.h +++ b/src/IO/ReadBuffer.h @@ -165,7 +165,7 @@ public: { auto read_bytes = read(to, n); if (n != read_bytes) - throw ParsingException("Cannot read all data. Bytes read: " + std::to_string(read_bytes) + ". Bytes expected: " + std::to_string(n) + ".", ErrorCodes::CANNOT_READ_ALL_DATA); + throw Exception("Cannot read all data. Bytes read: " + std::to_string(read_bytes) + ". Bytes expected: " + std::to_string(n) + ".", ErrorCodes::CANNOT_READ_ALL_DATA); } /** A method that can be more efficiently implemented in derived classes, in the case of reading large enough blocks.