aboutsummaryrefslogtreecommitdiffstats
path: root/src/vpp-api
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2018-06-20 13:53:10 +0200
committerFlorin Coras <florin.coras@gmail.com>2018-06-21 07:45:54 +0000
commit65ce94a1dcafbba684085e1136b3f12c7bdface3 (patch)
tree9d08cf7c1ff30b5934a94e2a98ba88ba3763b86d /src/vpp-api
parent586479a73162426a02b2bbc8ab724e0dfb9921e0 (diff)
jvpp: do not fail on type parsing error
skip the type instead. Change-Id: I533c8e13c1b2d05c1ddc6dc36427bac010d7c19a Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'src/vpp-api')
-rwxr-xr-xsrc/vpp-api/java/jvpp/gen/jvppgen/jvpp_model.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/vpp-api/java/jvpp/gen/jvppgen/jvpp_model.py b/src/vpp-api/java/jvpp/gen/jvppgen/jvpp_model.py
index 3b09a81cfc4..8b60c0dc4f3 100755
--- a/src/vpp-api/java/jvpp/gen/jvppgen/jvpp_model.py
+++ b/src/vpp-api/java/jvpp/gen/jvppgen/jvpp_model.py
@@ -310,11 +310,14 @@ class JVppModel(object):
self._types_by_name[n + _ARRAY_SUFFIX] = Array(t)
for json_type in self._types:
- name = json_type[0]
- definition = json_type[1:]
- _type = self._parse_type(name, definition)
- self._types_by_name[name] = _type
- self._types_by_name[name + _ARRAY_SUFFIX] = Array(_type)
+ try:
+ name = json_type[0]
+ definition = json_type[1:]
+ _type = self._parse_type(name, definition)
+ self._types_by_name[name] = _type
+ self._types_by_name[name + _ARRAY_SUFFIX] = Array(_type)
+ except ParseException as e:
+ self.logger.warning("Failed to parse %s type: %s. Skipping type definition.", name, e)
self.types = self._types_by_name.values()