[#BloombergLP-bdljsn-Error-2constructor-06]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdljsn.adoc[bdljsn]::xref:BloombergLP/bdljsn/Error.adoc[Error]::Error
:relfileprefix: ../../../
:mrdocs:

Constructors

== Synopses

Declared in `&lt;bdljsn&lowbar;error&period;h&gt;`

Create an `Error` object having the default value (see )&period; Optionally specify a `basicAllocator` used to supply memory&period; If `basicAllocator` is 0, the currently installed default allocator is used&period;


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

[.small]#xref:BloombergLP/bdljsn/Error/2constructor-01.adoc[_» more&period;&period;&period;_]#

Create a `Error` object having the same value and the same allocator as the specified `original` object&period; The value of `original` becomes unspecified but valid, and its allocator remains unchanged&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdljsn/Error/2constructor-0dc.adoc[Error](xref:BloombergLP/bslmf/MovableRef.adoc[bslmf::MovableRef&lt;Error&gt;] original) noexcept;
----

[.small]#xref:BloombergLP/bdljsn/Error/2constructor-0dc.adoc[_» more&period;&period;&period;_]#

Create an `Error` object having the default value, using the specified `basicAllocator` to supply memory&period; If `basicAllocator` is 0, the currently installed default allocator is used&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:BloombergLP/bdljsn/Error/2constructor-07.adoc[Error](xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator);
----

[.small]#xref:BloombergLP/bdljsn/Error/2constructor-07.adoc[_» more&period;&period;&period;_]#

Create a `Error` object having the same value as the specified `original` object, and using the specified `basicAllocator` to supply memory&period; If `basicAllocator` is 0, the currently installed default allocator is used&period; The allocator of `original` remains unchanged&period; If `original` and the newly created object have the same allocator then the value of `original` becomes unspecified but valid, and no exceptions will be thrown&semi; otherwise `original` is unchanged and an exception may be thrown&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdljsn/Error/2constructor-02.adoc[Error](
    xref:BloombergLP/bslmf/MovableRef.adoc[bslmf::MovableRef&lt;Error&gt;] original,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator);
----

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

Create an `Error` object having the value of the specified `original` object&period; Optionally specify a `basicAllocator` used to supply memory&period; If `basicAllocator` is 0, the currently installed default allocator is used&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdljsn/Error/2constructor-0de.adoc[Error](
    xref:BloombergLP/bdljsn/Error.adoc[Error] const& original,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

[.small]#xref:BloombergLP/bdljsn/Error/2constructor-0de.adoc[_» more&period;&period;&period;_]#

Create an `Error` object having the specified `location` and `message`&period; Optionally specify a `basicAllocator` used to supply memory&period; If `basicAllocator` is 0, the currently installed default allocator is used&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdljsn/Error/2constructor-0d1.adoc[Error](
    xref:BloombergLP/bdljsn/Location.adoc[Location] const& location,
    std::string&lowbar;view const& message,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----

[.small]#xref:BloombergLP/bdljsn/Error/2constructor-0d1.adoc[_» more&period;&period;&period;_]#


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