[#absl-Status-Update-01] = xref:absl.adoc[absl]::xref:absl/Status.adoc[Status]::Update :relfileprefix: ../../ :mrdocs: Updates the existing status with `new_status` provided that `this‐>ok()`. == Synopsis Declared in `<absl/status/status.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void Update(xref:absl/Status.adoc[Status] const& new_status); ---- == Description If the existing status already contains a non‐OK error, this update has no effect and preserves the current data. Note that this behavior may change in the future to augment a current non‐ok status with additional information about `new_status`. `Update()` provides a convenient way of keeping track of the first error encountered. Example: // Instead of "if (overall_status.ok()) overall_status = new_status" overall_status.Update(new_status); == Parameters [cols="1,4"] |=== | Name| Description | *new_status* | The status to apply if `*this` is currently OK. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#