<div dir="ltr">If you mean something like:<div>
<p class=""><span class=""> logger.exception(</span><span class="">"Ed's message is this err = '%s'"</span><span class="">%(err),exc_info=err</span><span class="">)</span></p><p class=""><span class="">or</span></p><p class=""><span class="">
</span></p><p class=""><span class=""> logger.exception(</span><span class="">"Ed's message is this err = '%s'"</span><span class="">%(err),exc_info=err,stack_info=</span><span class="">True</span><span class="">) (if we want to see the exception stack search)</span></p><p class=""><span class=""><br></span></p><p class=""><span class="">Then, i'd agree your way is better/clearer.</span></p><p class="">-b<br></p><p class="">an intel employee</p></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 8, 2016 at 9:03 PM, Christopher Larson <span dir="ltr"><<a href="mailto:clarson@kergoth.com" target="_blank">clarson@kergoth.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><span class=""><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>From: Ed Bartosh <<a href="mailto:ed.bartosh@linux.intel.com" target="_blank">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" target="_blank">ed.bartosh@linux.intel.com</a>><br>
Signed-off-by: brian avery <<a href="mailto:brian.avery@intel.com" target="_blank">brian.avery@intel.com</a>><br>
---<br>
lib/<span>bb</span>/runqueue.py | 6 ++++--<br>
1 file changed, 4 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/lib/<span>bb</span>/runqueue.py b/lib/<span>bb</span>/runqueue.py<br>
index 57be15a..04f2f4c 100644<br>
--- a/lib/<span>bb</span>/runqueue.py<br>
+++ b/lib/<span>bb</span>/runqueue.py<br>
@@ -1219,8 +1219,10 @@ <span>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></span>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().<span class="HOEnZb"><font color="#888888"><br>-- <br><div 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>
</font></span></div></div>
</blockquote></div><br></div>