#include <bdld_datumerror.h>
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.
See bdld_datumerror
◆ DatumError() [1/4]
| bdld::DatumError::DatumError |
( |
| ) |
|
|
inline |
Create a DatumError object having the default error code of 0 and an empty error message.
◆ DatumError() [2/4]
| bdld::DatumError::DatumError |
( |
int |
code | ) |
|
|
inlineexplicit |
Create a DatumError object having the specified error code value and and empty error message.
◆ DatumError() [3/4]
Create a DatumError object having the specified error code value and the specified error message value. Note that the message is held by the reference and not copied.
◆ DatumError() [4/4]
| bdld::DatumError::DatumError |
( |
const DatumError & |
origin | ) |
|
|
default |
◆ ~DatumError()
| bdld::DatumError::~DatumError |
( |
| ) |
|
|
default |
◆ BSLMF_NESTED_TRAIT_DECLARATION() [1/2]
◆ BSLMF_NESTED_TRAIT_DECLARATION() [2/2]
◆ code()
| int bdld::DatumError::code |
( |
| ) |
const |
|
inline |
◆ 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.
◆ operator=()
◆ print()
| bsl::ostream & bdld::DatumError::print |
( |
bsl::ostream & |
stream, |
|
|
int |
level = 0, |
|
|
int |
spacesPerLevel = 4 |
|
) |
| const |
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.
The documentation for this class was generated from the following file: