Enhance the expansion exception message

(Bitbake rev: 1cc11164a85a5b30d6b9184cb5a8f7f7ac1aaff2)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
Chris Larson 2010-04-20 15:56:20 -07:00 committed by Richard Purdie
parent 1e7a03cb58
commit 8bc7ebb4ae
1 changed files with 3 additions and 6 deletions

View File

@ -182,13 +182,10 @@ def emit_var(var, o=sys.__stdout__, d = init(), all=False):
if all:
oval = getVar(var, d, 0)
val = getVar(var, d, 1)
except KeyboardInterrupt:
except (KeyboardInterrupt, bb.build.FuncFailed):
raise
except:
excname = str(sys.exc_info()[0])
if excname == "bb.build.FuncFailed":
raise
o.write('# expansion of %s threw %s\n' % (var, excname))
except Exception, exc:
o.write('# expansion of %s threw %s: %s\n' % (var, exc.__class__.__name__, str(exc)))
return 0
if all: