Skip to content

Commit

Permalink
Add error ID arrow:io:ipc:InvalidConstructionType.
Browse files Browse the repository at this point in the history
  • Loading branch information
kevingurney committed Jan 14, 2025
1 parent 1f4fa23 commit 555629e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions matlab/src/cpp/arrow/matlab/error/error.h
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ static const char* IPC_RECORD_BATCH_WRITE_FAILED =
static const char* IPC_RECORD_BATCH_WRITE_CLOSE_FAILED = "arrow:io:ipc:CloseFailed";
static const char* IPC_RECORD_BATCH_READER_OPEN_FAILED =
"arrow:io:ipc:FailedToOpenRecordBatchReader";
static const char* IPC_RECORD_BATCH_READER_INVALID_CONSTRUCTION_TYPE = "arrow:io:ipc:InvalidConstructionType";
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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,10 @@ libmexclass::proxy::MakeResult RecordBatchStreamReader::make(
const auto type_utf16 = std::u16string(type_mda[0]);
if (type_utf16 == u"Bytes") {
return RecordBatchStreamReader::fromBytes(constructor_arguments);
} else if (type_utf16 == u"Filename") {
} else if (type_utf16 == u"File") {
return RecordBatchStreamReader::fromFile(constructor_arguments);
} else {
// TODO: Create static error id string
return libmexclass::error::Error{"arrow:some:test:id", "Invalid construction type for RecordBatchStreamReader."};
return libmexclass::error::Error{"arrow:io:ipc:InvalidConstructionType", "Invalid construction type for RecordBatchStreamReader."};
}
}

Expand Down

0 comments on commit 555629e

Please sign in to comment.