[#BloombergLP-bdld-Datum-createError-04]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdld.adoc[bdld]::xref:BloombergLP/bdld/Datum.adoc[Datum]::createError
:relfileprefix: ../../../
:mrdocs:

`createError` overloads

== Synopses

Declared in `&lt;bdld&lowbar;datum&period;h&gt;`

Return a datum holding an error with the specified `code`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
xref:BloombergLP/bdld/Datum.adoc[Datum]
xref:BloombergLP/bdld/Datum/createError-0df.adoc[createError](int code);
----

[.small]#xref:BloombergLP/bdld/Datum/createError-0df.adoc[_» more&period;&period;&period;_]#

Return a datum holding an error with `code` and `message`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
xref:BloombergLP/bdld/Datum.adoc[Datum]
xref:BloombergLP/bdld/Datum/createError-0d2.adoc[createError](
    int code,
    xref:BloombergLP/bslstl/StringRef.adoc[bslstl::StringRef] const& message,
    xref:BloombergLP/bdld/Datum/AllocatorType.adoc[AllocatorType] const& allocator);
----

[.small]#xref:BloombergLP/bdld/Datum/createError-0d2.adoc[_» more&period;&period;&period;_]#

== Return Value

* a datum holding an error with the specified `code`
* a datum holding an error with `code` and `message`

== Parameters

[cols="1,4"]
|===
| Name| Description
| *code*
| error code
| *message*
| optional error message
| *allocator*
| memory allocator to use
|===


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