[Lldb-commits] [PATCH] D129614: [lldb/crashlog] Surface error using SBCommandReturnObject argument

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Aug 3 11:06:25 PDT 2022


JDevlieghere requested changes to this revision.
JDevlieghere added inline comments.
This revision now requires changes to proceed.


================
Comment at: lldb/examples/python/crashlog.py:1013-1015
+        nonlocal result
+        result.SetError(sb_error, "error: %s" % message)
+        return
----------------
kastiglione wrote:
> Is this `error` function needed? `SetError` prepends the string "error: ".
Rather than raising a generic Exception, we should define our own. Now there's no way to differentiate between these issues and any other exception that was thrown. Maybe that's the goal, in which case you can still catch the generic Exception, but by defining our own we leave the option open to be more specific.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129614/new/

https://reviews.llvm.org/D129614



More information about the lldb-commits mailing list