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

This unconstrained (value&hyphen;semantic) attribute class specifies a description of an error in processing a (JSON) document&period; See the  for information on the class attributes&period; Note that the class invariants are identically the constraints on the individual attributes&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class Error;
----

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdljsn/Error/2constructor-06.adoc[`Error`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/bdljsn/Error/2destructor.adoc[`&#126;Error`] [.small]#[destructor]#
| Destroy this object&period;
| xref:BloombergLP/bdljsn/Error/operator_assign-06.adoc[`operator&equals;`] 
| Assignment operators
| xref:BloombergLP/bdljsn/Error/allocator.adoc[`allocator`] 
| Return the allocator used by this object to supply memory&period; Note that if no allocator was supplied at construction the default allocator in effect at construction is used&period;
| xref:BloombergLP/bdljsn/Error/location.adoc[`location`] 
| Return the `location` attribute of this object&period;
| xref:BloombergLP/bdljsn/Error/message.adoc[`message`] 
| Return the `message` attribute of this object&period;
| xref:BloombergLP/bdljsn/Error/print.adoc[`print`] 
| Write the value of this object to the specified output `stream` in a human&hyphen;readable format, and return a non&hyphen;`const` reference to `stream`&period; Optionally specify an initial indentation `level`, whose absolute value is incremented recursively for nested objects&period; If `level` is specified, optionally specify `spacesPerLevel`, whose absolute value indicates the number of spaces per indentation level for this and all of its nested objects&period; If `level` is negative, suppress indentation of the first line&period; If `spacesPerLevel` is negative, format the entire output on one line, suppressing all but the initial indentation (as governed by `level`)&period; If `stream` is not valid on entry, this operation has no effect&period; Note that the format is not fully specified, and can change without notice&period;
| xref:BloombergLP/bdljsn/Error/reset.adoc[`reset`] 
| Reset this object to the default value (i&period;e&period;, its value upon default construction)&period;
| xref:BloombergLP/bdljsn/Error/setLocation.adoc[`setLocation`] 
| Set the `location` attribute of this object to the specified `value`&period;
| xref:BloombergLP/bdljsn/Error/setMessage.adoc[`setMessage`] 
| Set the `message` attribute of this object to the specified `value`&period;
| xref:BloombergLP/bdljsn/Error/swap.adoc[`swap`] 
| Efficiently exchange the value of this object with the value of the specified `other` object&period; This method provides the no&hyphen;throw exception&hyphen;safety guarantee&period; The behavior is undefined unless this object was created with the same allocator as `other`&period;
| xref:BloombergLP/bdljsn/Error/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration&lt;Error, IsBitwiseMoveable&gt;`] 
| Declare that this type uses a `bslma` allocator&period;
|===


== Friends

[cols="1,4"]
|===
| Name| Description
| `xref:BloombergLP/bdljsn/swap-0d.adoc[BloombergLP::bdljsn::swap]`
| Exchange the values of the specified `a` and `b` objects&period; This function provides the no&hyphen;throw exception&hyphen;safety guarantee if the two objects were created with the same allocator and the basic guarantee otherwise&period;
|===

== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdljsn/operator_not_eq-08b.adoc[`operator!&equals;`]
| Return `true` if the specified `lhs` and `rhs` attribute objects do not have the same value, and `false` otherwise&period; Two attribute objects do not have the same value if one or more respective attributes differ in values&period;
| xref:BloombergLP/bdljsn/operator_eq-01.adoc[`operator&equals;&equals;`]
| Return `true` if the specified `lhs` and `rhs` attribute objects have the same value, and `false` otherwise&period; Two attribute objects have the same value if each respective attribute has the same value&period;
|===


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