Eolian: log function gen exceptions with level DEBUG

This commit is contained in:
Kai Huuhko 2014-06-23 18:14:54 +03:00
parent c1be409a9c
commit 8e9827e8f2
1 changed files with 7 additions and 6 deletions

View File

@ -3,6 +3,7 @@
import os import os
import textwrap import textwrap
import keyword import keyword
from traceback import format_exc
from collections import Counter from collections import Counter
@ -708,11 +709,11 @@ class Class(object):
if eo_prefix: if eo_prefix:
try: try:
o = EoConstructor.parse(ctor, eo_prefix, None) o = EoConstructor.parse(ctor, eo_prefix, None)
except Exception as e: except Exception:
log.error(e)
log.debug( log.debug(
"Skipping %s.%s because of an exception" "Skipping %s.%s because of an exception"
% (cls.name, ctor.name)) % (cls.name, ctor.name))
log.debug(format_exc())
continue continue
else: else:
# try: # try:
@ -738,11 +739,11 @@ class Class(object):
function_counter["_".join((prefix, prop.name))] += 1 function_counter["_".join((prefix, prop.name))] += 1
try: try:
o = Property.parse(prop, eo_prefix, legacy_prefix) o = Property.parse(prop, eo_prefix, legacy_prefix)
except Exception as e: except Exception:
log.error(e)
log.debug( log.debug(
"Skipping %s.%s because of an exception" "Skipping %s.%s because of an exception"
% (cls.name, prop.name)) % (cls.name, prop.name))
log.debug(format_exc())
continue continue
self.props.append(o) self.props.append(o)
generated_function_counter["_".join((prefix, prop.name))] += 1 generated_function_counter["_".join((prefix, prop.name))] += 1
@ -752,11 +753,11 @@ class Class(object):
function_counter["_".join((prefix, method.name))] += 1 function_counter["_".join((prefix, method.name))] += 1
try: try:
o = Method.parse(method, eo_prefix, legacy_prefix) o = Method.parse(method, eo_prefix, legacy_prefix)
except Exception as e: except Exception:
log.error(e)
log.debug( log.debug(
"Skipping %s.%s because of an exception" "Skipping %s.%s because of an exception"
% (cls.name, method.name)) % (cls.name, method.name))
log.debug(format_exc())
continue continue
self.methods.append(o) self.methods.append(o)
generated_function_counter["_".join((prefix, method.name))] += 1 generated_function_counter["_".join((prefix, method.name))] += 1