Skip to content

Commit

Permalink
fix building
Browse files Browse the repository at this point in the history
Signed-off-by: wangbaiping <wangbaiping@bytedance.com>
  • Loading branch information
wbpcode committed Oct 10, 2024
1 parent 9b7f888 commit c8eb56c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions source/common/protobuf/yaml_utility.cc
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,12 @@ void MessageUtil::loadFromJson(absl::string_view json, Protobuf::Message& messag
}
if (has_unknown_field) {
// If the parsing failure is caused by the unknown fields.
THROW_IF_NOT_OK(validation_visitor.onUnknownField("type " + message.GetTypeName() + " reason " +
load_status.ToString()));
THROW_IF_NOT_OK(validation_visitor.onUnknownField(
fmt::format("type {} reason {}", message.GetTypeName(), load_status.ToString())));
} else {
// If the error has nothing to do with unknown field.
throw EnvoyException("Unable to parse JSON as proto (" + load_status.ToString() + "): " + json);
throw EnvoyException(
fmt::format("Unable to parse JSON as proto ({}): {}", load_status.ToString(), json));
}
}

Expand Down

0 comments on commit c8eb56c

Please sign in to comment.