summaryrefslogtreecommitdiffstats
path: root/adapter/socketclient/socketclient.go
diff options
context:
space:
mode:
authorOndrej Fabry <ofabry@cisco.com>2019-11-15 12:33:28 +0100
committerOndrej Fabry <ofabry@cisco.com>2019-11-15 12:33:28 +0100
commite45d8802fd8de3602db630d75b370ff804000da9 (patch)
tree8803fe98338b4ed196d4c8881624c7ba869b9e53 /adapter/socketclient/socketclient.go
parent2f75863ba9bff2d2f3488b70e441b5eefc91dfd2 (diff)
Improve compatibility checking
- added CompatibilityError to api package to represent error with list of incompatible messages - added UnknownMsgError to adapter package to represent error for unknown message - added list of registered message types Change-Id: I2623b45135521d52612ba91e4605fc064a7fc76e Signed-off-by: Ondrej Fabry <ofabry@cisco.com>
Diffstat (limited to 'adapter/socketclient/socketclient.go')
-rw-r--r--adapter/socketclient/socketclient.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/adapter/socketclient/socketclient.go b/adapter/socketclient/socketclient.go
index 043d253..366163f 100644
--- a/adapter/socketclient/socketclient.go
+++ b/adapter/socketclient/socketclient.go
@@ -419,7 +419,7 @@ func (c *vppClient) GetMsgID(msgName string, msgCrc string) (uint16, error) {
msg := msgName + "_" + msgCrc
msgID, ok := c.msgTable[msg]
if !ok {
- return 0, fmt.Errorf("unknown message: %q", msg)
+ return 0, &adapter.UnknownMsgError{msgName, msgCrc}
}
return msgID, nil
}