[#node-Warnings-Set]
= xref:node.adoc[node]::xref:node/Warnings.adoc[Warnings]::Set
:relfileprefix: ../../
:mrdocs:

Set a warning message&period; If a warning with the specified `id` is already active, false is returned and the new warning is ignored&period; If `id` does not yet exist, the warning is set, the UI is updated, and true is returned&period;

== Synopsis

Declared in `&lt;node&sol;warnings&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;requires&lowbar;capability(0x7f2e144313b8)&rsqb;&rsqb;
bool
Set(
    xref:node/Warnings.adoc[warning&lowbar;type] id,
    xref:bilingual_str.adoc[bilingual&lowbar;str] message);
----

== Return Value

true if the warning was indeed set (i&period;e&period; there is no active warning with this `id`), otherwise false&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *id* [in]
| Unique identifier of the warning&period;
| *message* [in]
| Warning message to be shown&period;
|===


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