From 68ec940a469be5e1696fa6bb8dd4cea54d092796 Mon Sep 17 00:00:00 2001 From: Ole Troan Date: Thu, 31 Aug 2017 13:18:44 +0200 Subject: VPP-960: Python API add more information in exception for invalid arguments to API calls. Change-Id: I266eef8419fd98b9b900573ac9b032a62600ab86 Signed-off-by: Ole Troan --- src/vpp-api/python/vpp_papi.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/vpp-api') diff --git a/src/vpp-api/python/vpp_papi.py b/src/vpp-api/python/vpp_papi.py index 55dda104..14f367c2 100644 --- a/src/vpp-api/python/vpp_papi.py +++ b/src/vpp-api/python/vpp_papi.py @@ -246,7 +246,10 @@ class VPP(): for k in kwargs: if k not in msgdef['args']: - raise ValueError(1, 'Invalid field-name in message call ' + k) + raise ValueError(1,'Non existing argument [' + k + ']' + \ + ' used in call to: ' + \ + self.id_names[kwargs['_vl_msg_id']] + '()' ) + for k, v in vpp_iterator(msgdef['args']): off += size -- cgit 1.2.3-korg