I’m trying to handle the networking errors, but RegisterHandler apparently is just being ignored.
I.e. I call it, and it is exactly as if I didn’t: I still get the default error handling.
• I start the server
• I connect the client to the server
• I quit the server
• the client gets a standard timeout error, instead of being handled
What am I doing wrong?
Meanwhile I’ve noticed I can just ignore the RegisterHandler and instead override a few functions in the NetworkManager:
public override void OnClientError (NetworkConnection conn, int errorCode)
{
Debug.Log("Client error #"+errorCode+" on "+conn);
}
Which would be nice, but it still doesn’t suppress the standard error. How do I make that go away? No, just unchecking “Error Pause” is very obviously not an answer.
That error is supposed to be there. It will tell you that the client has disconnected. Nothing you can do about it to prevent it from outputting the log message.
If you still think it is annoying, turn off “Show Log Error Messages” in the Console tab.
If you still think that is not helpful, ask @seanr .
If I handle them personally, I… handle them personally. If they get thrown anyway ignoring my own handler, what’s the point of having a handler in the first place?