]> code.ossystems Code Review - openembedded-core.git/commitdiff
Show a traceback when a task fails due to an exception
authorChris Larson <chris_larson@mentor.com>
Thu, 10 Jun 2010 02:26:21 +0000 (19:26 -0700)
committerRichard Purdie <rpurdie@linux.intel.com>
Fri, 2 Jul 2010 14:41:36 +0000 (15:41 +0100)
(Bitbake rev: 5bb24832761bd518cb0249125f67939e0cbd0998)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
bitbake/lib/bb/runqueue.py

index a73e0c4a6a48e9c4fa454f919d84c77a28fe8cdf..93fff5d27b1c40bfaf89b6785146559db42c41c8 100644 (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)