cmtice wrote:

I've fixed all the style/format requests.

I ran into some difficulties with the structured error handling requests:
- DiagnosticError has only one constructor, which only takes an error code. On 
examning how it's called/used in other places, it doesn't look like it's 
designed to be used as you have suggested.
- Based on the way DiagnosticError is use, I've created a new error class, 
DILDiagnosticError, patterned after the OptionParserError clas, which DOES make 
use of DiagnosticError.
- I have not been able to discover any way of converting DILDiagnosticError or 
DiagnosticDetail into an llvm::Error at all.
- The only way I could find to convert a DILDiagnosticError into an 
LLDB::Status, was to extract the DiagnosticDetail message and create the 
LLDB::Status around that.
- We currently still have to leave the errors as LLDB::Status errors, because 
the calls into & out of GetVariableValueForExpressionPath have no way (at the 
moment) of handling structured errors (i.e. DiagnosticDetails or 
DILDiagnosticErrors).  We should probably change that in the future, but I 
would prefer to do that in a different PR.

So I've done the best I can to honor your error handling request, but it 
doesn't feel very satisfactory.

https://github.com/llvm/llvm-project/pull/120971
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to