[#absl-StatusBuilder-SetErrorCode-01]
= xref:absl.adoc[absl]::xref:absl/StatusBuilder.adoc[StatusBuilder]::SetErrorCode
:relfileprefix: ../../
:mrdocs:

Sets a non&hyphen;canonical error code on the result status&period;

== Synopsis

Declared in `&lt;absl&sol;status&sol;status&lowbar;builder&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename Enum&gt;
xref:absl/StatusBuilder.adoc[StatusBuilder]&
SetErrorCode(Enum code) &amp;
requires std&colon;&colon;is&lowbar;void&lowbar;v&lt;decltype(AbslInternalSetErrorCode(&ast;this, code))&gt;;
----

== Description

INTERNAL API&period; NOT FOR PUBLIC USE&period;

== Return Value

`&ast;this` to allow method chaining&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *code*
| The error code to set&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
