Skip to content

KnownTypePolymorhicMessagePackSerializer error message improvement #95

@thomas-joiner

Description

@thomas-joiner

This applies to release 0.6.0-Beta4.

I ran into an issue when using KnownTypes. In the end, the issue ended up being that I was using [MessagePackKnownType] instead of [MessagePackKnownCollectionItemType]. The error message that I received was:

System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at MsgPack.Serialization.Polymorphic.KnownTypePolymorhicMessagePackSerializer`1.PackToCore(Packer packer, T objectTree)
[...]

It would have been nice to know what key it was looking up to make figuring out what the issue was easier.

Also, the typo in the class name should probably be fixed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementRequires or request to feature enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions