BloombergLP::bdld::DatumError

This component class provides a complex constrained attribute type, bdld::DatumError, that represents an error code with an optional descriptive error message. Note that this class holds a reference to the error message and does not make a copy of it.

Synopsis

Declared in <bdld_datumerror.h>

class DatumError;

Member Functions

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

Non-Member Functions

NameDescription
operator!=Return true if the specified lhs and rhs have different values and false otherwise. Two DatumError objects have different values if they have different error code or message values.
operator<Return true if value of the specified lhs is less than value of the specified rhs and false otherwise. 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.
operator<=Return true if value of the specified lhs is less than or equal to value of the specified rhs and false otherwise. 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.
operator==Return true if the specified lhs and rhs have the same value and false otherwise. Two DatumError objects have the same value if they have same error code and message values.
operator>Return true if value of the specified lhs is greater than value of the specified rhs and false otherwise. 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.
operator>=Return true if value of the specified lhs is greater than or equal to value of the specified rhs and false otherwise. 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.