Original Post
What is the best approach for handling exceptions when parsing a received message on the client. Such as the data mentions a character the client has no idea about for whatever reason. I am working with a TCP connection so I don't have to worry about out of order or incomplete messages. Should I log the exception and then send a message to the server notifying it that the client had problems parsing the message. Following the example, the client would send the server "Who is character X?" and then the server would reply back with the response. Is this overkill considering this will very rarely happen - only when there is a bug somewhere? Then again, what would the client do if it has problems parsing this second message.
Unfortunately doing nothing would leave the client in a unhappy and confused state. Would closing the game gracefully and asking the user to upload their logs be a better approach?
As you can see, I am uncertain what to do in this situation. If anyone can provide some insight that would be greatly appreciated.
Unfortunately doing nothing would leave the client in a unhappy and confused state. Would closing the game gracefully and asking the user to upload their logs be a better approach?
As you can see, I am uncertain what to do in this situation. If anyone can provide some insight that would be greatly appreciated.