[#BloombergLP-bdld-DatumError]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdld.adoc[bdld]::DatumError
:relfileprefix: ../../
:mrdocs:

This component `class` provides a _complex constrained_ attribute type, `bdld&colon;&colon;DatumError`, that represents an error code with an optional descriptive error message&period; Note that this class holds a reference to the error message and does not make a copy of it&period;

== Synopsis

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

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

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdld/DatumError/2constructor-0b.adoc[`DatumError`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/bdld/DatumError/code.adoc[`code`] 
| Return the error code&period;
| xref:BloombergLP/bdld/DatumError/message.adoc[`message`] 
| Return a reference to the non&hyphen;modifyable error message&period; The returned reference remains valid as long as the underlying message is not modified or destroyed &hyphen;&hyphen; irrespective of the state (or existence) of this object&period; The behavior is undefined unless the underlying error message has been modified or destroyed since this object was created&period;
| xref:BloombergLP/bdld/DatumError/print.adoc[`print`] 
| Write the value of this object to the specified output `stream` in a human&hyphen;readable format, and return a reference to the modifyable `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, suppress all but the initial indentation (as governed by `level`)&period; For readability the entire output is formatted on one line, regardless of the `spacesPerLevel` value&period; If `stream` is not valid on entry, this operation has no effect&period; Note that this human&hyphen;readable format is not fully specified, and can change without notice&period;
| xref:BloombergLP/bdld/DatumError/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration&lt;DatumError, HasPrintMethod&gt;`] 
| `DatumError` is trivially copyable&period;
|===


== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdld/operator_not_eq-0f.adoc[`operator!&equals;`]
| Return `true` if the specified `lhs` and `rhs` have different values and `false` otherwise&period; Two `DatumError` objects have different values if they have different error code or message values&period;
| xref:BloombergLP/bdld/operator_lt-03.adoc[`operator&lt;`]
| Return `true` if value of the specified `lhs` is less than value of the specified `rhs` and `false` otherwise&period; Value of `lhs` is less than value of `rhs` if error code value of `lhs` is less than error code value of `rhs`, or they have the same error code value and error message value of `lhs` is less than error message value of `rhs`&period;
| xref:BloombergLP/bdld/operator_le-06.adoc[`operator&lt;&equals;`]
| Return `true` if value of the specified `lhs` is less than or equal to value of the specified `rhs` and `false` otherwise&period; Value of `lhs` is less than or equal to value of `rhs` if error code value of `lhs` is less than or equal to error code value of `rhs`, or they have the same error code value and error message value of `lhs` is less than or equal to error message value of `rhs`&period;
| xref:BloombergLP/bdld/operator_eq-0b.adoc[`operator&equals;&equals;`]
| Return `true` if the specified `lhs` and `rhs` have the same value and `false` otherwise&period; Two `DatumError` objects have the same value if they have same error code and message values&period;
| xref:BloombergLP/bdld/operator_gt-05.adoc[`operator&gt;`]
| Return `true` if value of the specified `lhs` is greater than value of the specified `rhs` and `false` otherwise&period; Value of `lhs` is greater than value of `rhs` if error code value of `lhs` is greater than error code value of `rhs`, or they have the same error code value and error message value of `lhs` is greater than error message value of `rhs`&period;
| xref:BloombergLP/bdld/operator_ge-07.adoc[`operator&gt;&equals;`]
| Return `true` if value of the specified `lhs` is greater than or equal to value of the specified `rhs` and `false` otherwise&period; Value of `lhs` is greater than or equal to value of `rhs` if error code value of `lhs` is greater than or equal to error code value of `rhs`, or they have the same error code value and error message value of `lhs` is greater than or equal to error message value of `rhs`&period;
|===


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