From c06e81fd8d6c827e13e7d010d3629f38058fb3a0 Mon Sep 17 00:00:00 2001 From: Ziyi Tan Date: Thu, 6 Jul 2023 13:49:07 +0800 Subject: [PATCH] [Improvement][C++] Refine the error message of Reader SDK (#195) Signed-off-by: Ziy1-Tan --- cpp/include/gar/reader/arrow_chunk_reader.h | 2 +- cpp/include/gar/reader/chunk_info_reader.h | 2 +- cpp/src/reader_utils.cc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cpp/include/gar/reader/arrow_chunk_reader.h b/cpp/include/gar/reader/arrow_chunk_reader.h index 1da8cf93a..abbd9ae9a 100644 --- a/cpp/include/gar/reader/arrow_chunk_reader.h +++ b/cpp/include/gar/reader/arrow_chunk_reader.h @@ -85,7 +85,7 @@ class VertexPropertyArrowChunkReader { } if (chunk_index_ >= chunk_num_) { return Status::IndexError("Internal vertex id ", id, - " is not out of range [0,", + " is out of range [0,", chunk_num_ * vertex_info_.GetChunkSize(), ") of vertex ", vertex_info_.GetLabel()); } diff --git a/cpp/include/gar/reader/chunk_info_reader.h b/cpp/include/gar/reader/chunk_info_reader.h index fe0fee67b..d7ce2f8fc 100644 --- a/cpp/include/gar/reader/chunk_info_reader.h +++ b/cpp/include/gar/reader/chunk_info_reader.h @@ -72,7 +72,7 @@ class VertexPropertyChunkInfoReader { chunk_index_ = id / vertex_info_.GetChunkSize(); if (chunk_index_ >= chunk_num_) { return Status::IndexError("Internal vertex id ", id, - " is not out of range [0,", + " is out of range [0,", chunk_num_ * vertex_info_.GetChunkSize(), ") of vertex ", vertex_info_.GetLabel()); } diff --git a/cpp/src/reader_utils.cc b/cpp/src/reader_utils.cc index c400afcfb..08b0cc49f 100644 --- a/cpp/src/reader_utils.cc +++ b/cpp/src/reader_utils.cc @@ -50,7 +50,7 @@ Result> GetAdjListOffsetOfVertex( } else { return Status::Invalid( "The adj list type has to be ordered_by_source or ordered_by_dest, but " - "got " + + "got ", std::string(AdjListTypeToString(adj_list_type))); }