================
@@ -112,8 +113,46 @@ void CommandReturnObject::SetError(Status error) {
}
void CommandReturnObject::SetError(llvm::Error error) {
- if (error)
+ // Retrieve any diagnostics.
+ error = llvm::handleErrors(std::move(error), [&](ExpressionErrorBase &error)
{
+ SetStatus(eReturnStatusFailed);
+ m_diagnostics = error.GetDetails();
+ });
+ if (error) {
AppendError(llvm::toString(std::move(error)));
+ }
+}
+
+llvm::StringRef
+CommandReturnObject::GetInlineDiagnosticsData(unsigned indent,
----------------
adrian-prantl wrote:
Agreed. I made it slightly less weird by moving the indent computation into
CommandInterpreter, but I still can't say I like it.
https://github.com/llvm/llvm-project/pull/110901
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits