From 65ce94a1dcafbba684085e1136b3f12c7bdface3 Mon Sep 17 00:00:00 2001 From: Marek Gradzki Date: Wed, 20 Jun 2018 13:53:10 +0200 Subject: jvpp: do not fail on type parsing error skip the type instead. Change-Id: I533c8e13c1b2d05c1ddc6dc36427bac010d7c19a Signed-off-by: Marek Gradzki --- src/vpp-api/java/jvpp/gen/jvppgen/jvpp_model.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src') 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() -- cgit 1.2.3-korg