Skip to content

Commit

Permalink
update message pack to 2.5.187
Browse files Browse the repository at this point in the history
  • Loading branch information
eugene-doobu committed Oct 21, 2024
1 parent 6fa652b commit 5014689
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
18 changes: 17 additions & 1 deletion Lib9c.MessagePack/Formatters/ExceptionFormatter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,29 @@ public void Serialize(ref MessagePackWriter writer, T? value,
for (int i = 0; i < count; i++)
{
var name = reader.ReadString();
if (name == null)
{
throw new MessagePackSerializationException("Exception Name is missing.");
}

if (name == "ExceptionType")
{
typeName = reader.ReadString();
}
else
{
var type = Type.GetType(reader.ReadString());
var readType = reader.ReadString();
if (readType == null)
{
throw new MessagePackSerializationException("Exception type information is missing.");
}

var type = Type.GetType(readType);
if (type == null)
{
throw new MessagePackSerializationException("Exception type information is missing.");
}

var value = MessagePackSerializer.Deserialize(type, ref reader, options);
info.AddValue(name, value);
}
Expand Down
6 changes: 3 additions & 3 deletions Lib9c.MessagePack/Lib9c.MessagePack.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="MessagePack" Version="2.3.85" />
<PackageReference Include="MessagePack.Annotations" Version="2.3.85" />
<PackageReference Include="MessagePackAnalyzer" Version="2.3.85">
<PackageReference Include="MessagePack" Version="2.5.187" />
<PackageReference Include="MessagePack.Annotations" Version="2.5.187" />
<PackageReference Include="MessagePackAnalyzer" Version="2.5.187">
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down

0 comments on commit 5014689

Please sign in to comment.