================ @@ -1954,32 +1896,41 @@ bool CPlusPlusLanguage::HandleFrameFormatVariable( FormatEntity::Entry::Type type, Stream &s) { switch (type) { case FormatEntity::Entry::Type::FunctionScope: { - std::optional<llvm::StringRef> scope = GetDemangledScope(sc); - if (!scope) + auto scope_or_err = GetDemangledScope(sc); + if (!scope_or_err) { + LLDB_LOG_ERROR(GetLog(LLDBLog::Language), scope_or_err.takeError(), + "Failed to retrieve scope: {0}"); return false; + } - s << *scope; + s << *scope_or_err; return true; } case FormatEntity::Entry::Type::FunctionBasename: { - std::optional<llvm::StringRef> name = GetDemangledBasename(sc); - if (!name) + auto name_or_err = GetDemangledBasename(sc); + if (!name_or_err) { + LLDB_LOG_ERROR(GetLog(LLDBLog::Language), name_or_err.takeError(), + "Failed to retrieve basename: {0}"); ---------------- charles-zablit wrote:
Added better messages for all the `LLDB_LOG_ERROR`. https://github.com/llvm/llvm-project/pull/144731 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits