[#absl-Status-2constructor-00] = xref:absl.adoc[absl]::xref:absl/Status.adoc[Status]::Status :relfileprefix: ../../ :mrdocs: Creates a status in the canonical error space with the specified `absl::StatusCode` and error message. If `code == absl::StatusCode::kOk`, `msg` is ignored and an object identical to an OK status is constructed. == Synopsis Declared in `<absl/status/status.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- Status( xref:absl/StatusCode.adoc[absl::StatusCode] code, std::string_view msg, xref:absl/SourceLocation.adoc[absl::SourceLocation] loc = SourceLocation::current()); ---- == Description The `msg` string must be in UTF‐8. The implementation may complain (e.g., by printing a warning) if it is not. The `loc` is the SourceLocation of the callsite. It will be stored in the Status iff `code != absl::StatusCode::kOk` and `!msg.empty()`. == Parameters [cols="1,4"] |=== | Name| Description | *code* | The canonical error code for the status. | *msg* | The UTF‐8 error message. | *loc* | The source location of the callsite. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#