Show a traceback when a task fails due to an exception

(Bitbake rev: 5bb24832761bd518cb0249125f67939e0cbd0998)

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-06-09 19:26:21 -07:00 committed by Richard Purdie
parent c63278bf34
commit 88a257634a
1 changed files with 4 additions and 3 deletions

View File

@ -981,10 +981,11 @@ class RunQueue:
try:
self.cooker.tryBuild(fn, taskname[3:])
except bb.build.EventException:
bb.msg.error(bb.msg.domain.Build, "Build of " + fn + " " + taskname + " failed")
os._exit(1)
except:
bb.msg.error(bb.msg.domain.Build, "Build of " + fn + " " + taskname + " failed")
except Exception:
from traceback import format_exc
bb.msg.error(bb.msg.domain.Build, "Build of %s %s failed" % (fn, taskname))
bb.msg.error(bb.msg.domain.Build, format_exc())
os._exit(1)
os._exit(0)