Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

better exception message for SerializableStateManager.GetStatefulGameObjectType #2444

Conversation

andrew-raphael-lukasik
Copy link
Contributor

@andrew-raphael-lukasik andrew-raphael-lukasik commented Oct 13, 2022

What

More precise exception message for SerializableStateManager.GetStatefulGameObjectType method

Why

Misleading Exception: ISerializableGameObject type not implemented for DaggerfallWorkshop.Game.Serialization.SerializablePlayer appeared while working on #2442

Results

This PR does not resolve the underlying issue but fixes the messaging to clear out confusion first.

A new message is:

NotImplementedException: GetStatefulGameObjectType does not know what to do with DaggerfallWorkshop.Game.Serialization.SerializablePlayer
DaggerfallWorkshop.Game.Serialization.SerializableStateManager.GetStatefulGameObjectType (DaggerfallWorkshop.Game.Serialization.ISerializableGameObject sgObj) (at Assets/Scripts/Game/Serialization/SerializableStateManager.cs:495)
DaggerfallWorkshop.Game.Serialization.SerializableStateManager.DeregisterStatefulGameObject (DaggerfallWorkshop.Game.Serialization.ISerializableGameObject serializableObject) (at Assets/Scripts/Game/Serialization/SerializableStateManager.cs:263)
DaggerfallWorkshop.Game.Serialization.SaveLoadManager.DeregisterSerializableGameObject (DaggerfallWorkshop.Game.Serialization.ISerializableGameObject serializableObject) (at Assets/Scripts/Game/Serialization/SaveLoadManager.cs:553)
DaggerfallWorkshop.Game.Serialization.SerializablePlayer.OnDestroy () (at Assets/Scripts/Game/Serialization/SerializablePlayer.cs:88)

I am not familiar with this segment of the codebase atm to resolve this further on my own so I will leave that to the professionals to decide.

@andrew-raphael-lukasik andrew-raphael-lukasik changed the title better exception message for GetStatefulGameObjectType better exception message for SerializableStateManager.GetStatefulGameObjectType Oct 13, 2022
@Interkarma
Copy link
Owner

Thank you, I think this is a nice change. :)

@Interkarma Interkarma merged commit a0ac540 into Interkarma:master Dec 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants