Skip to content

Commit

Permalink
Merge pull request #6639 from planetarium/fix/add-messagepack-excepti…
Browse files Browse the repository at this point in the history
…on-handle

add messagepack exception handle
  • Loading branch information
jonny-jeahyunchoi authored Jan 2, 2025
2 parents 4e727cf + 24dd854 commit 08202a0
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions nekoyume/Assets/_Scripts/Blockchain/RPCAgent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -912,9 +912,16 @@ public void OnRender(byte[] evaluation)
df.CopyTo(decompressed);
decompressed.Seek(0, SeekOrigin.Begin);
var dec = decompressed.ToArray();
var ev = MessagePackSerializer.Deserialize<NCActionEvaluation>(dec)
.ToActionEvaluation();
ActionRenderer.ActionRenderSubject.OnNext(ev);
try
{
var ev = MessagePackSerializer.Deserialize<NCActionEvaluation>(dec)
.ToActionEvaluation();
ActionRenderer.ActionRenderSubject.OnNext(ev);
}
catch (Exception e)
{
NcDebug.LogError($"[RPCAgent] OnRender()... Failed to deserialize ActionEvaluation. {e}");
}
}
}
}
Expand Down

0 comments on commit 08202a0

Please sign in to comment.