diff options
Diffstat (limited to 'bitbake/lib/bb/ui/toasterui.py')
-rw-r--r-- | bitbake/lib/bb/ui/toasterui.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bitbake/lib/bb/ui/toasterui.py b/bitbake/lib/bb/ui/toasterui.py index df9f362284..db119cea67 100644 --- a/bitbake/lib/bb/ui/toasterui.py +++ b/bitbake/lib/bb/ui/toasterui.py | |||
@@ -327,9 +327,17 @@ def main(server, eventHandler, params ): | |||
327 | except Exception as e: | 327 | except Exception as e: |
328 | # print errors to log | 328 | # print errors to log |
329 | import traceback | 329 | import traceback |
330 | from pprint import pformat | ||
330 | exception_data = traceback.format_exc() | 331 | exception_data = traceback.format_exc() |
331 | logger.error("%s\n%s" % (e, exception_data)) | 332 | logger.error("%s\n%s" % (e, exception_data)) |
332 | 333 | ||
334 | exc_type, exc_value, tb = sys.exc_info() | ||
335 | if tb is not None: | ||
336 | curr = tb | ||
337 | while curr is not None: | ||
338 | logger.warn("Error data dump %s\n%s\n" % (traceback.format_tb(curr,1), pformat(curr.tb_frame.f_locals))) | ||
339 | curr = curr.tb_next | ||
340 | |||
333 | # save them to database, if possible; if it fails, we already logged to console. | 341 | # save them to database, if possible; if it fails, we already logged to console. |
334 | try: | 342 | try: |
335 | buildinfohelper.store_log_exception("%s\n%s" % (str(e), exception_data)) | 343 | buildinfohelper.store_log_exception("%s\n%s" % (str(e), exception_data)) |