================ @@ -843,11 +843,28 @@ Status PluginManager::SaveCore(const lldb::ProcessSP &process_sp, } // Check to see if any of the object file plugins tried and failed to save. - // If none ran, set the error message. - if (error.Success()) - error = Status::FromErrorString( - "no ObjectFile plugins were able to save a core for this process"); - return error; + // if any failure, return the error message. + if (error.Fail()) + return error; + + // Report only for the plugin that was specified. + if (!plugin_name.empty()) + return Status::FromErrorStringWithFormatv( + "The \"{}\" plugin is not able to save a core for this process.", + plugin_name); + + return Status::FromErrorString( + "no ObjectFile plugins were able to save a core for this process"); +} ---------------- DavidSpickett wrote:
These two errors don't have test coverage. > "The \"{}\" plugin is not able to save a core for this process." To hit this one we'd need a plugin that can save a core, but not for this process. > "no ObjectFile plugins were able to save a core for this process" Same thing but there needs to be > 1 plugin that tried. And the original error doesn't have coverage either, presumably because no one has the appetite to inject a problem into a process. Which is fair enough. So yes these don't have coverage but it's not the end of the world if someone gets the wrong one so I'm not going to demand tests for them. https://github.com/llvm/llvm-project/pull/143126 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits