Skip to content

Commit 9531e70

Browse files
committed
Add error ID constant for arrow:io:ipc:EndOfStream.
1 parent 481a095 commit 9531e70

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

matlab/src/cpp/arrow/matlab/error/error.h

+1
Original file line numberDiff line numberDiff line change
@@ -250,5 +250,6 @@ static const char* IPC_RECORD_BATCH_READER_OPEN_FAILED =
250250
static const char* IPC_RECORD_BATCH_READ_INVALID_INDEX = "arrow:io:ipc:InvalidIndex";
251251
static const char* IPC_RECORD_BATCH_READ_FAILED = "arrow:io:ipc:ReadFailed";
252252
static const char* IPC_TABLE_READ_FAILED = "arrow:io:ipc:TableReadFailed";
253+
static const char* IPC_END_OF_STREAM = "arrow:io:ipc:EndOfStream";
253254

254255
} // namespace arrow::matlab::error

matlab/src/cpp/arrow/matlab/io/ipc/proxy/record_batch_stream_reader.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ void RecordBatchStreamReader::readRecordBatch(
105105
// signalling the end of the stream.
106106
if (!nextRecordBatch) {
107107
context.error =
108-
Error{"arrow:io:ipc:EndOfStream",
109-
"Reached end of Arrow IPC Stream. No more record batches to read."};
108+
Error{error::IPC_END_OF_STREAM,
109+
"Reached end of Arrow IPC Stream. No more record batches to read."};
110110
return;
111111
}
112112
auto record_batch_proxy = std::make_shared<RecordBatchProxy>(nextRecordBatch);

0 commit comments

Comments
 (0)