From f0fd4349a78aff99b7e2214bf1ffe9e352201de3 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Tue, 3 Nov 2020 11:49:59 -0800 Subject: [PATCH] [crashlog] Print the actual exception in the CommandReturnObject Before: error: python exception After: error: python exception: 'DarwinImage' object has no attribute 'debugger' --- lldb/examples/python/crashlog.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lldb/examples/python/crashlog.py b/lldb/examples/python/crashlog.py index 76538715f17e..d3943fb3f0fe 100755 --- a/lldb/examples/python/crashlog.py +++ b/lldb/examples/python/crashlog.py @@ -849,8 +849,8 @@ def save_crashlog(debugger, command, exe_ctx, result, dict): def Symbolicate(debugger, command, result, dict): try: SymbolicateCrashLogs(shlex.split(command)) - except: - result.PutCString("error: python exception %s" % sys.exc_info()[0]) + except Exception as e: + result.PutCString("error: python exception: %s" % e) def SymbolicateCrashLog(crash_log, options):