================
@@ -150,6 +151,11 @@ llvm::Expected<std::string> 
ValueObjectPrinter::GetDescriptionForDisplay() {
   if (maybe_str)
     return maybe_str;
 
+  if (maybe_str.errorIsA<lldb_private::ExpressionError>())
+    // Propagate expression errors to expose diagnostics to the user.
+    // Without this early exit, the summary/value may be shown without errors.
+    return maybe_str;
+
----------------
adrian-prantl wrote:

Would this be testable by running an expression that fails reliably? For 
example by implementing a [-description] method that crashes?

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

Reply via email to