From 24dd8542193bd68b1eb308fc04a7cdb99d1f9396 Mon Sep 17 00:00:00 2001 From: jonny Date: Thu, 19 Dec 2024 17:43:41 +0900 Subject: [PATCH] add messagepack exception handle --- nekoyume/Assets/_Scripts/Blockchain/RPCAgent.cs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/nekoyume/Assets/_Scripts/Blockchain/RPCAgent.cs b/nekoyume/Assets/_Scripts/Blockchain/RPCAgent.cs index 511cc706927..fd45bfeb1d1 100644 --- a/nekoyume/Assets/_Scripts/Blockchain/RPCAgent.cs +++ b/nekoyume/Assets/_Scripts/Blockchain/RPCAgent.cs @@ -928,9 +928,16 @@ public void OnRender(byte[] evaluation) df.CopyTo(decompressed); decompressed.Seek(0, SeekOrigin.Begin); var dec = decompressed.ToArray(); - var ev = MessagePackSerializer.Deserialize(dec) - .ToActionEvaluation(); - ActionRenderer.ActionRenderSubject.OnNext(ev); + try + { + var ev = MessagePackSerializer.Deserialize(dec) + .ToActionEvaluation(); + ActionRenderer.ActionRenderSubject.OnNext(ev); + } + catch (Exception e) + { + NcDebug.LogError($"[RPCAgent] OnRender()... Failed to deserialize ActionEvaluation. {e}"); + } } } }