[#BloombergLP-bdljsn-Error] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdljsn.adoc[bdljsn]::Error :relfileprefix: ../../ :mrdocs: This unconstrained (value‐semantic) attribute class specifies a description of an error in processing a (JSON) document. See the for information on the class attributes. Note that the class invariants are identically the constraints on the individual attributes. == Synopsis Declared in `<bdljsn_error.h>` [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[`~Error`] [.small]#[destructor]# | Destroy this object. | xref:BloombergLP/bdljsn/Error/operator_assign-06.adoc[`operator=`] | Assignment operators | xref:BloombergLP/bdljsn/Error/allocator.adoc[`allocator`] | Return the allocator used by this object to supply memory. Note that if no allocator was supplied at construction the default allocator in effect at construction is used. | xref:BloombergLP/bdljsn/Error/location.adoc[`location`] | Return the `location` attribute of this object. | xref:BloombergLP/bdljsn/Error/message.adoc[`message`] | Return the `message` attribute of this object. | xref:BloombergLP/bdljsn/Error/print.adoc[`print`] | Write the value of this object to the specified output `stream` in a human‐readable format, and return a non‐`const` reference to `stream`. Optionally specify an initial indentation `level`, whose absolute value is incremented recursively for nested objects. 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. If `level` is negative, suppress indentation of the first line. If `spacesPerLevel` is negative, format the entire output on one line, suppressing all but the initial indentation (as governed by `level`). If `stream` is not valid on entry, this operation has no effect. Note that the format is not fully specified, and can change without notice. | xref:BloombergLP/bdljsn/Error/reset.adoc[`reset`] | Reset this object to the default value (i.e., its value upon default construction). | xref:BloombergLP/bdljsn/Error/setLocation.adoc[`setLocation`] | Set the `location` attribute of this object to the specified `value`. | xref:BloombergLP/bdljsn/Error/setMessage.adoc[`setMessage`] | Set the `message` attribute of this object to the specified `value`. | xref:BloombergLP/bdljsn/Error/swap.adoc[`swap`] | Efficiently exchange the value of this object with the value of the specified `other` object. This method provides the no‐throw exception‐safety guarantee. The behavior is undefined unless this object was created with the same allocator as `other`. | xref:BloombergLP/bdljsn/Error/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration<Error, IsBitwiseMoveable>`] | Declare that this type uses a `bslma` allocator. |=== == 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. This function provides the no‐throw exception‐safety guarantee if the two objects were created with the same allocator and the basic guarantee otherwise. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bdljsn/operator_not_eq-08b.adoc[`operator!=`] | Return `true` if the specified `lhs` and `rhs` attribute objects do not have the same value, and `false` otherwise. Two attribute objects do not have the same value if one or more respective attributes differ in values. | xref:BloombergLP/bdljsn/operator_eq-01.adoc[`operator==`] | Return `true` if the specified `lhs` and `rhs` attribute objects have the same value, and `false` otherwise. Two attribute objects have the same value if each respective attribute has the same value. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#