More specific error code [#CLICKHOUSE-2].

This commit is contained in:
Alexey Milovidov 2017-03-14 22:06:25 +03:00
parent b47cc72701
commit 701f69de6b
3 changed files with 5 additions and 4 deletions

View File

@ -363,6 +363,7 @@ namespace ErrorCodes
extern const int INTO_OUTFILE_NOT_ALLOWED = 358;
extern const int TABLE_SIZE_EXCEEDS_MAX_DROP_SIZE_LIMIT = 359;
extern const int CANNOT_CREATE_CHARSET_CONVERTER = 360;
extern const int SEEK_POSITION_OUT_OF_BOUND = 361;
extern const int KEEPER_EXCEPTION = 999;
extern const int POCO_EXCEPTION = 1000;

View File

@ -6,7 +6,7 @@ namespace DB
namespace ErrorCodes
{
extern const int ARGUMENT_OUT_OF_BOUND;
extern const int SEEK_POSITION_OUT_OF_BOUND;
}
@ -93,7 +93,7 @@ void CachedCompressedReadBuffer::seek(size_t offset_in_compressed_file, size_t o
nextImpl();
if (offset_in_decompressed_block > working_buffer.size())
throw Exception("Seek position is beyond the decompressed block", ErrorCodes::ARGUMENT_OUT_OF_BOUND);
throw Exception("Seek position is beyond the decompressed block", ErrorCodes::SEEK_POSITION_OUT_OF_BOUND);
pos = working_buffer.begin() + offset_in_decompressed_block;
bytes -= offset();

View File

@ -7,7 +7,7 @@ namespace DB
namespace ErrorCodes
{
extern const int ARGUMENT_OUT_OF_BOUND;
extern const int SEEK_POSITION_OUT_OF_BOUND;
}
@ -57,7 +57,7 @@ void CompressedReadBufferFromFile::seek(size_t offset_in_compressed_file, size_t
nextImpl();
if (offset_in_decompressed_block > working_buffer.size())
throw Exception("Seek position is beyond the decompressed block", ErrorCodes::ARGUMENT_OUT_OF_BOUND);
throw Exception("Seek position is beyond the decompressed block", ErrorCodes::SEEK_POSITION_OUT_OF_BOUND);
pos = working_buffer.begin() + offset_in_decompressed_block;
bytes -= offset();