[#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 `<bdljsn_error.h>` Create an `Error` object having the default value (see ). Optionally specify a `basicAllocator` used to supply memory. If `basicAllocator` is 0, the currently installed default allocator is used. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdljsn/Error/2constructor-01.adoc[Error](); ---- [.small]#xref:BloombergLP/bdljsn/Error/2constructor-01.adoc[_» more..._]# Create a `Error` object having the same value and the same allocator as the specified `original` object. The value of `original` becomes unspecified but valid, and its allocator remains unchanged. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdljsn/Error/2constructor-0dc.adoc[Error](xref:BloombergLP/bslmf/MovableRef.adoc[bslmf::MovableRef<Error>] original) noexcept; ---- [.small]#xref:BloombergLP/bdljsn/Error/2constructor-0dc.adoc[_» more..._]# Create an `Error` object having the default value, using the specified `basicAllocator` to supply memory. If `basicAllocator` is 0, the currently installed default allocator is used. [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..._]# Create a `Error` object having the same value as the specified `original` object, and using the specified `basicAllocator` to supply memory. If `basicAllocator` is 0, the currently installed default allocator is used. The allocator of `original` remains unchanged. 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; otherwise `original` is unchanged and an exception may be thrown. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdljsn/Error/2constructor-02.adoc[Error]( xref:BloombergLP/bslmf/MovableRef.adoc[bslmf::MovableRef<Error>] original, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator); ---- [.small]#xref:BloombergLP/bdljsn/Error/2constructor-02.adoc[_» more..._]# Create an `Error` object having the value of the specified `original` object. Optionally specify a `basicAllocator` used to supply memory. If `basicAllocator` is 0, the currently installed default allocator is used. [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..._]# Create an `Error` object having the specified `location` and `message`. Optionally specify a `basicAllocator` used to supply memory. If `basicAllocator` is 0, the currently installed default allocator is used. [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_view const& message, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0); ---- [.small]#xref:BloombergLP/bdljsn/Error/2constructor-0d1.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#