diff options
author | gvit <gvit@ydb.tech> | 2022-07-19 14:49:59 +0300 |
---|---|---|
committer | gvit <gvit@ydb.tech> | 2022-07-19 14:49:59 +0300 |
commit | 91295e425aef1bf1e2d22f5973ea16a089a2d880 (patch) | |
tree | 96e94ceb8bae611512264240e8cf5da5759254de /library/cpp/protobuf | |
parent | 62d316c142834b7d53315c1680b6f0ce9a56d185 (diff) | |
download | ydb-91295e425aef1bf1e2d22f5973ea16a089a2d880.tar.gz |
add more details to error message when parsing json to protobuf
Diffstat (limited to 'library/cpp/protobuf')
-rw-r--r-- | library/cpp/protobuf/json/json2proto.cpp | 3 |
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); |