[Lldb-commits] [lldb] [lldb] Add lldb.summary and lldb.synthetic decorators (PR #195351)

via lldb-commits lldb-commits at lists.llvm.org
Tue May 5 13:49:35 PDT 2026


jimingham wrote:

> > > raise an exception in the decorator if the CRO has an error ?
> > 
> > 
> > `GetError()` can returning strings prefixed by "warning: ", so those shouldn't be raised as an exception. Should the decorator have differing behavior, print for non-errors, raise for errors?
> 
> Sounds good. IMO if `warning:` shouldn't be reported as an error in the CommandReturnObject but rather as a regular output. This is a bit orthogonal to this PR but still wondering what @jimingham thinks of this.

The real way to tell whether an SBCommandReturnObject is for a command that got an error or not is to check `result.GetStatus()`.  If you see `lldb.eReturnStatusFailed`, then that's a failure.  Anything else is a success.  If you use AppendError when setting an error in a return object, it automatically sets the status to `eReturnStatusFailed`.

https://github.com/llvm/llvm-project/pull/195351


More information about the lldb-commits mailing list