Enumerate the set of named errors for the baltzo
package.
More...
Detailed Description
- Outline
-
-
- Purpose:
- Enumerate the set of named errors for the
baltzo
package.
-
- Classes:
-
- See also:
- Component baltzo_localtimedescriptor, Component baltzo_timezoneutil
-
- Description:
- This component provides a namespace,
baltzo::ErrorCode
, for the enum
type baltzo::ErrorCode::Enum
, which enumerates the set of named error codes returned by functions across the baltzo
package.
-
- Enumerators:
Name Description
---------------- --------------------------------------
k_UNSUPPORTED_ID Time zone identifier is not supported.
k_OUT_OF_RANGE A conversion would have resulted in a value outside of
the valid range
-
- Usage:
- This section illustrates intended use of this component.
-
- Example 1: Basic Syntax:
- The following snippets of code provide a simple illustration of
baltzo::ErrorCode
usage.
- First, we create a variable
value
of type baltzo::ErrorCode::Enum
and initialize it with the enumerator value baltzo::ErrorCode::k_UNSUPPORTED_ID
: Now, we store a pointer to its ASCII representation in a variable asciiValue
of type const char *
: Finally, we print value
to bsl::cout
. bsl::cout << value << bsl::endl;
This statement produces the following output on stdout
: