aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgvit <gvit@ydb.tech>2022-07-19 14:49:59 +0300
committergvit <gvit@ydb.tech>2022-07-19 14:49:59 +0300
commit91295e425aef1bf1e2d22f5973ea16a089a2d880 (patch)
tree96e94ceb8bae611512264240e8cf5da5759254de
parent62d316c142834b7d53315c1680b6f0ce9a56d185 (diff)
downloadydb-91295e425aef1bf1e2d22f5973ea16a089a2d880.tar.gz
add more details to error message when parsing json to protobuf
-rw-r--r--library/cpp/protobuf/json/json2proto.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/library/cpp/protobuf/json/json2proto.cpp b/library/cpp/protobuf/json/json2proto.cpp
index 640c10f5a5..92bfe9755b 100644
--- a/library/cpp/protobuf/json/json2proto.cpp
+++ b/library/cpp/protobuf/json/json2proto.cpp
@@ -377,10 +377,9 @@ namespace NProtobufJson {
return;
}
- Y_ENSURE(json.IsMap(), "expected json map");
-
const google::protobuf::Descriptor* descriptor = proto.GetDescriptor();
Y_ASSERT(!!descriptor);
+ Y_ENSURE(json.IsMap(), "Failed to merge json to proto for message: " << descriptor->full_name() << ", expected json map.");
for (int f = 0, endF = descriptor->field_count(); f < endF; ++f) {
const google::protobuf::FieldDescriptor* field = descriptor->field(f);