diff --git a/matlab/src/cpp/arrow/matlab/error/error.h b/matlab/src/cpp/arrow/matlab/error/error.h index 35df0b0af9f81..425e089d9f2f9 100644 --- a/matlab/src/cpp/arrow/matlab/error/error.h +++ b/matlab/src/cpp/arrow/matlab/error/error.h @@ -250,5 +250,6 @@ static const char* IPC_RECORD_BATCH_READER_OPEN_FAILED = static const char* IPC_RECORD_BATCH_READ_INVALID_INDEX = "arrow:io:ipc:InvalidIndex"; static const char* IPC_RECORD_BATCH_READ_FAILED = "arrow:io:ipc:ReadFailed"; static const char* IPC_TABLE_READ_FAILED = "arrow:io:ipc:TableReadFailed"; +static const char* IPC_END_OF_STREAM = "arrow:io:ipc:EndOfStream"; } // namespace arrow::matlab::error diff --git a/matlab/src/cpp/arrow/matlab/io/ipc/proxy/record_batch_stream_reader.cc b/matlab/src/cpp/arrow/matlab/io/ipc/proxy/record_batch_stream_reader.cc index 325f69e903140..cf167879f2f9f 100644 --- a/matlab/src/cpp/arrow/matlab/io/ipc/proxy/record_batch_stream_reader.cc +++ b/matlab/src/cpp/arrow/matlab/io/ipc/proxy/record_batch_stream_reader.cc @@ -105,8 +105,8 @@ void RecordBatchStreamReader::readRecordBatch( // signalling the end of the stream. if (!nextRecordBatch) { context.error = - Error{"arrow:io:ipc:EndOfStream", - "Reached end of Arrow IPC Stream. No more record batches to read."}; + Error{error::IPC_END_OF_STREAM, + "Reached end of Arrow IPC Stream. No more record batches to read."}; return; } auto record_batch_proxy = std::make_shared(nextRecordBatch);