mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-01 03:32:38 +00:00
add error catch to serialize
This commit is contained in:
parent
d75136bbc3
commit
c17ea7607f
@ -1257,7 +1257,16 @@ namespace QuantumUNET
|
||||
if (handlers.ContainsKey(msgType) && m_LocalConnection != null)
|
||||
{
|
||||
var writer = new QNetworkWriter();
|
||||
msg.Serialize(writer);
|
||||
try
|
||||
{
|
||||
msg.Serialize(writer);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
QLog.Error($"Error serializing msgId:{msgType} - {ex}");
|
||||
return false;
|
||||
}
|
||||
|
||||
var reader = new QNetworkReader(writer);
|
||||
m_LocalConnection.InvokeHandler(msgType, reader, channelId);
|
||||
result = true;
|
||||
|
Loading…
Reference in New Issue
Block a user