Merge pull request #4811 from htuch/invalid-name-json

json: include field name in InvalidName status messages.
pull/4815/head
Feng Xiao 7 years ago committed by GitHub
commit bdf0d1d6f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      src/google/protobuf/util/json_util.cc

@ -127,7 +127,8 @@ class StatusErrorListener : public converter::ErrorListener {
virtual void InvalidName(const converter::LocationTrackerInterface& loc, virtual void InvalidName(const converter::LocationTrackerInterface& loc,
StringPiece unknown_name, StringPiece message) { StringPiece unknown_name, StringPiece message) {
status_ = util::Status(util::error::INVALID_ARGUMENT, status_ = util::Status(util::error::INVALID_ARGUMENT,
loc.ToString() + ": " + string(message)); loc.ToString() + ": invalid name " +
string(unknown_name) + ": " + string(message));
} }
virtual void InvalidValue(const converter::LocationTrackerInterface& loc, virtual void InvalidValue(const converter::LocationTrackerInterface& loc,

Loading…
Cancel
Save