[#absl-ExtraMessage]
= xref:absl.adoc[absl]::ExtraMessage
:relfileprefix: ../
:mrdocs:

StatusBuilder policy to append an extra message to the original status&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class ExtraMessage;
----

== Description

This is most useful with adaptors such as `util&colon;&colon;TaskReturn` that otherwise would prevent use of `operator&lt;&lt;`&period; For example&colon;

ABSL&lowbar;RETURN&lowbar;IF&lowbar;ERROR(foo(val)) &period;With(absl&colon;&colon;ExtraMessage(&quot;when calling foo()&quot;)) &period;With(util&colon;&colon;TaskReturn(task))&semi;

or

ABSL&lowbar;RETURN&lowbar;IF&lowbar;ERROR(foo(val)) &period;With(absl&colon;&colon;ExtraMessage() &lt;&lt; &quot;val&colon; &quot; &lt;&lt; val) &period;With(util&colon;&colon;TaskReturn(task))&semi;

Note in the above example, the `ABSL&lowbar;RETURN&lowbar;IF&lowbar;ERROR` macro ensures the `ExtraMessage` expression is evaluated only in the error case, so efficiency of constructing the message is not a concern in the success case&period;

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:absl/ExtraMessage/2constructor-085.adoc[`ExtraMessage`]         [.small]#[constructor]#
| Constructors
| xref:absl/ExtraMessage/operator_call.adoc[`operator()`] 
| Appends the accumulated extra message to `builder`&period;
| xref:absl/ExtraMessage/operator_lshift-0a.adoc[`operator&lt;&lt;`] 
| Left shift operators
|===



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