absl::AbslInternalSetErrorCode

Argument-dependent lookup extension point that sets a StatusBuilder's error code.

Synopsis

Declared in <absl/status/status_builder.h>

void
AbslInternalSetErrorCode(
    StatusBuilder& builder,
    absl::StatusCode code);

Description

This is the extension point behind StatusBuilder::SetErrorCode(). It lets StatusBuilder be open-sourced into Abseil without introducing hard dependencies on non-canonical error spaces or protobuf. A simple shell is defined here, while SFINAE prevents actual usage unless this extension point is also defined, which is only the case in internal libraries.

Parameters

NameDescription
builderThe StatusBuilder to modify.
codeThe error code to set.