absl::StatusBuilder::StatusBuilder

Creates a StatusBuilder from a status code.

Synopsis

Declared in <absl/status/status_builder.h>

explicit
StatusBuilder(
    absl::StatusCode code,
    absl::SourceLocation location = absl::SourceLocation::current());

Description

If logging is enabled, it will use location as the location from which the log message occurs. A typical user will not specify location, allowing it to default to the current location.

Parameters

NameDescription
codeThe status code the result will be based on.
locationThe source location associated with the builder.