protocolbuffers/protobuf

Dotnet - Include key name when failing to add to a MapField due to a duplicate key

Open

#17,085 建立於 2024年6月10日

在 GitHub 查看
 (0 留言) (0 反應) (0 負責人)C++ (16,128 fork)batch import
help wanted

倉庫指標

Star
 (71,223 star)
PR 合併指標
 (平均合併 2天 11小時) (30 天內合併 185 個 PR)

描述

What language does this apply to? C#/dotnet

Describe the problem you are trying to solve. Trying to understand why adding a key to a MapField fails

Describe the solution you'd like The Argument exception should contain the name of the key that failed being added https://github.com/protocolbuffers/protobuf/blob/54d8f03974c108ef8fd0f26568cd9eb086165568/csharp/src/Google.Protobuf/Collections/MapField.cs#L97

Describe alternatives you've considered None

Additional context We aren't using this library directly, but through a 3rd party library that uses Google.Cloud.Logging.V2, making debugging challenging

貢獻者指南