<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 8, 2016 at 5:52 PM, brian avery <span dir="ltr"><<a href="mailto:avery.brian@gmail.com" target="_blank">avery.brian@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":1p7" class="a3s aXjCH m155cd253839bccde">From: Ed Bartosh <<a href="mailto:ed.bartosh@linux.intel.com">ed.bartosh@linux.intel.com</a>><br>
<br>
Runqueue errors direct the user to view the "failure below",<br>
but no additional error message is available.<br>
<br>
Log the stacktrace so that the user can see what went wrong.<br>
<br>
Signed-off-by: Ed Bartosh <<a href="mailto:ed.bartosh@linux.intel.com">ed.bartosh@linux.intel.com</a>><br>
Signed-off-by: brian avery <<a href="mailto:brian.avery@intel.com">brian.avery@intel.com</a>><br>
---<br>
lib/<span class="il">bb</span>/runqueue.py | 6 ++++--<br>
1 file changed, 4 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/lib/<span class="il">bb</span>/runqueue.py b/lib/<span class="il">bb</span>/runqueue.py<br>
index 57be15a..04f2f4c 100644<br>
--- a/lib/<span class="il">bb</span>/runqueue.py<br>
+++ b/lib/<span class="il">bb</span>/runqueue.py<br>
@@ -1219,8 +1219,10 @@ <span class="il">class</span> RunQueue:<br>
pass<br>
self.state = runQueueComplete<br>
raise<br>
- except:<br>
- logger.error("An uncaught exception occured in runqueue, please see the failure below:")<br>
+ except Exception as err:<br>
+ import traceback<br>
+ logger.error("An uncaught exception occured in runqueue: '%s'" % err)<br>
+ logger.error(traceback.format_exc())</div></blockquote></div><br>Is there a reason we aren't just passing the exception in and letting the logging format it and pass it through to the UI for formatting? See logger.exception() and the exc_info= keyword argument for error().<br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Christopher Larson<br>clarson at kergoth dot com<br>Founder - BitBake, OpenEmbedded, OpenZaurus<br>Maintainer - Tslib<br>Senior Software Engineer, Mentor Graphics</div>
</div></div>