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

Value&hyphen;semantic type for an error code with an optional error message&period;

== Synopsis

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

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

== Description

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;

== 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;
| 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;
| 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;
| 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;
| 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;
| 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;
| 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;
| 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;
|===


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