fix: making exception for OnDeserializeSafely more clear (#2562)

This commit is contained in:
James Frowen 2021-02-06 16:48:13 +00:00 committed by GitHub
parent 638796a0ad
commit 638f761469
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1027,7 +1027,7 @@ void OnDeserializeSafely(NetworkBehaviour comp, NetworkReader reader, bool initi
catch (Exception e)
{
// show a detailed error and let the user know what went wrong
logger.LogError($"OnDeserialize failed for: object={name} component={comp.GetType()} sceneId={sceneId:X} length={contentSize}. Possible Reasons:\n" +
logger.LogError($"OnDeserialize failed Exception={e.GetType()} (see below) object={name} component={comp.GetType()} sceneId={sceneId:X} length={contentSize}. Possible Reasons:\n" +
$" * Do {comp.GetType()}'s OnSerialize and OnDeserialize calls write the same amount of data({contentSize} bytes)? \n" +
$" * Was there an exception in {comp.GetType()}'s OnSerialize/OnDeserialize code?\n" +
$" * Are the server and client the exact same project?\n" +