Returns a copy of the current status, with loc appended to its location chain iff the status is non-ok and contains a non-empty message.
Declared in <absl/status/status.h>
Status
WithSourceLocation(absl::SourceLocation loc = absl::SourceLocation::current()) const &;
Example:
if (Status status = Foo(); !status.ok()) { return status.WithSourceLocation(); }
A copy of this status with loc appended.
| Name | Description |
|---|---|
| loc | The source location to append. |