aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Larson <chris_larson@mentor.com>2010-06-09 19:26:21 -0700
committerChris Larson <chris_larson@mentor.com>2010-06-09 19:32:36 -0700
commit5bb24832761bd518cb0249125f67939e0cbd0998 (patch)
tree3a7e879d09b11eb51629c7e51c5e6f98abb84ff3
parent37c77fb0ae2c893d23095de6c43476d8c891c679 (diff)
downloadbitbake-5bb24832761bd518cb0249125f67939e0cbd0998.tar.gz
bitbake-5bb24832761bd518cb0249125f67939e0cbd0998.tar.bz2
bitbake-5bb24832761bd518cb0249125f67939e0cbd0998.zip
Show a traceback when a task fails due to an exception
Signed-off-by: Chris Larson <chris_larson@mentor.com>
-rw-r--r--lib/bb/runqueue.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/bb/runqueue.py b/lib/bb/runqueue.py
index 3699ad87..b07395df 100644
--- a/lib/bb/runqueue.py
+++ b/lib/bb/runqueue.py
@@ -980,10 +980,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)