aboutsummaryrefslogtreecommitdiffstats
path: root/src/vpp-api/python
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2017-08-31 13:18:44 +0200
committerOle Trøan <otroan@employees.org>2017-09-13 07:20:53 +0000
commit68ec940a469be5e1696fa6bb8dd4cea54d092796 (patch)
tree0f0315adb3b68b9f36b8eb0517edcb3c1c25f201 /src/vpp-api/python
parent4b0ac82a739bf7f1233ebb61269e27aa4cf9ab36 (diff)
VPP-960: Python API add more information in exception for invalid arguments to API calls.
Change-Id: I266eef8419fd98b9b900573ac9b032a62600ab86 Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'src/vpp-api/python')
-rw-r--r--src/vpp-api/python/vpp_papi.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/vpp-api/python/vpp_papi.py b/src/vpp-api/python/vpp_papi.py
index 55dda1044b6..14f367c2336 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