Eolian: Skip function generating if there are errors in parsing

This commit is contained in:
Kai Huuhko 2014-06-19 12:35:47 +03:00
parent bb9a64aa71
commit dfb0a7f078
1 changed files with 24 additions and 3 deletions

View File

@ -517,16 +517,37 @@ class Class(object):
ctors = cls.functions_list_get(eolian.FunctionType.CTOR)
if ctors:
for ctor in ctors:
self.ctors.append(Constructor.parse(ctor, prefix))
try:
o = Constructor.parse(ctor, prefix)
except Exception:
log.exception(
"Skipping %s.%s because of an exception"
% (cls.name, ctor.name))
continue
self.ctors.append(o)
self.default_ctor = DefaultConstructor(prefix)
props = cls.functions_list_get(eolian.FunctionType.PROPERTY)
for prop in props:
self.props.append(Property.parse(prop, prefix))
try:
o = Property.parse(prop, prefix)
except Exception:
log.exception(
"Skipping %s.%s because of an exception"
% (cls.name, prop.name))
continue
self.props.append(o)
methods = cls.functions_list_get(eolian.FunctionType.METHOD)
for method in methods:
self.methods.append(Method.parse(method, prefix))
try:
o = Method.parse(method, prefix)
except Exception:
log.exception(
"Skipping %s.%s because of an exception"
% (cls.name, method.name))
continue
self.methods.append(o)
return self