[#BloombergLP-bdld-DatumError-2constructor-0b]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdld.adoc[bdld]::xref:BloombergLP/bdld/DatumError.adoc[DatumError]::DatumError
:relfileprefix: ../../../
:mrdocs:

Constructors

== Synopses

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

Create a `DatumError` object having the default error code of 0 and an empty error message&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdld/DatumError/2constructor-04.adoc[DatumError]();
----

[.small]#xref:BloombergLP/bdld/DatumError/2constructor-04.adoc[_» more&period;&period;&period;_]#

Create a `DatumError` object having the specified error `code` value and and empty error message&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:BloombergLP/bdld/DatumError/2constructor-02.adoc[DatumError](int code);
----

[.small]#xref:BloombergLP/bdld/DatumError/2constructor-02.adoc[_» more&period;&period;&period;_]#

Create a `DatumError` object having the specified `code` and `message`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdld/DatumError/2constructor-0a.adoc[DatumError](
    int code,
    xref:BloombergLP/bslstl/StringRef.adoc[bslstl::StringRef] const& message);
----

[.small]#xref:BloombergLP/bdld/DatumError/2constructor-0a.adoc[_» more&period;&period;&period;_]#

== Parameters

[cols="1,4"]
|===
| Name| Description
| *code*
| error code value
| *message*
| error message held by reference (not copied)
|===


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