Skip to content

Commit

Permalink
[Minor][C++] Revise the unsupported data type error msg to give more …
Browse files Browse the repository at this point in the history
…information (#391)

* [Minor][C++] revise the unsupported data type error msg to give more information

Signed-off-by: acezen <[email protected]>
  • Loading branch information
acezen authored Mar 7, 2024
1 parent 4bf186a commit 929d8d0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cpp/src/data_type.cc
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ std::shared_ptr<arrow::DataType> DataType::DataTypeToArrowDataType(
case Type::LIST:
return arrow::list(DataTypeToArrowDataType(type->child_));
default:
throw std::runtime_error("Unsupported data type");
std::string msg = "The data type " + type->ToTypeName() +
" is not supported yet in GraphAr";
throw std::runtime_error(msg);
}
}

Expand All @@ -66,7 +68,9 @@ std::shared_ptr<DataType> DataType::ArrowDataTypeToDataType(
case arrow::Type::LIST:
return list(ArrowDataTypeToDataType(type->field(0)->type()));
default:
throw std::runtime_error("Unsupported data type");
std::string msg = "The arrow data type " + type->name() +
" is not supported yet in GraphAr";
throw std::runtime_error(msg);
}
}

Expand Down

0 comments on commit 929d8d0

Please sign in to comment.