From e45d8802fd8de3602db630d75b370ff804000da9 Mon Sep 17 00:00:00 2001 From: Ondrej Fabry Date: Fri, 15 Nov 2019 12:33:28 +0100 Subject: 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 --- adapter/vppapiclient/vppapiclient.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'adapter/vppapiclient/vppapiclient.go') diff --git a/adapter/vppapiclient/vppapiclient.go b/adapter/vppapiclient/vppapiclient.go index fcd3f3f..977f32d 100644 --- a/adapter/vppapiclient/vppapiclient.go +++ b/adapter/vppapiclient/vppapiclient.go @@ -116,7 +116,7 @@ func (a *vppClient) GetMsgID(msgName string, msgCrc string) (uint16, error) { msgID := uint16(C.govpp_get_msg_index(nameAndCrc)) if msgID == ^uint16(0) { // VPP does not know this message - return msgID, fmt.Errorf("unknown message: %v (crc: %v)", msgName, msgCrc) + return msgID, &adapter.UnknownMsgError{msgName, msgCrc} } return msgID, nil -- cgit 1.2.3-korg