As of right now if a message fails to unpack it will become a unknown message and no error is ever bubbled up to the user.
As a user I am sometimes interested in a full list of all the unpack errors that occurred in one packet.
This is where the errors get lost at the moment
https://github.com/teeworlds-go/go-teeworlds-protocol/blob/eed93918e7be3b64e482472f24f858af47d3f339/protocol7/packet.go#L243-L253
Would it be nice to have a Errors []error field on the Packet struct? Should every single failed call to unpacker call the user hook OnError()?
As of right now if a message fails to unpack it will become a unknown message and no error is ever bubbled up to the user.
As a user I am sometimes interested in a full list of all the unpack errors that occurred in one packet.
This is where the errors get lost at the moment
https://github.com/teeworlds-go/go-teeworlds-protocol/blob/eed93918e7be3b64e482472f24f858af47d3f339/protocol7/packet.go#L243-L253
Would it be nice to have a
Errors []errorfield on the Packet struct? Should every single failed call to unpacker call the user hook OnError()?