BDE 4.39.x Production Release
Loading...
Searching...
No Matches
bsl::error_condition Class Reference

#include <bslstl_error.h>

Detailed Description

This class represents a portable error value.

See bslstl_error

Public Member Functions

 error_condition ()
 
 error_condition (int value, const error_category &category)
 
template<class ERROR_CONDITION_ENUM >
 error_condition (ERROR_CONDITION_ENUM value, typename enable_if< is_error_condition_enum< ERROR_CONDITION_ENUM >::value, BoolType >::type=0)
 
void assign (int value, const error_category &category)
 
template<class ERROR_CONDITION_ENUM >
enable_if< is_error_condition_enum< ERROR_CONDITION_ENUM >::value, error_condition & >::type operator= (ERROR_CONDITION_ENUM value)
 
void clear ()
 
const error_categorycategory () const
 
std::string message () const
 
int value () const
 
 operator BoolType () const
 

Constructor & Destructor Documentation

◆ error_condition() [1/3]

bsl::error_condition::error_condition ( )
inline

Create an object of this type initialized with value 0 and generic category.

◆ error_condition() [2/3]

bsl::error_condition::error_condition ( int  value,
const error_category category 
)
inline

Create an object of this type initialized with the specified value and category.

◆ error_condition() [3/3]

template<class ERROR_CONDITION_ENUM >
bsl::error_condition::error_condition ( ERROR_CONDITION_ENUM  value,
typename enable_if< is_error_condition_enum< ERROR_CONDITION_ENUM >::value, BoolType >::type  = 0 
)
inline

Construct an object of this type initialized with the specified value and its category (found from an overloaded call to make_error_condition).

Note
Note that this constructor exists only for those types designated as error conditions via the is_error_condition_enum trait template.

Member Function Documentation

◆ assign()

void bsl::error_condition::assign ( int  value,
const error_category category 
)
inline

Set this object to hold the specified value and category.

◆ category()

const error_category & bsl::error_condition::category ( ) const
inline

Return a const reference to the category held by this object.

◆ clear()

void bsl::error_condition::clear ( )
inline

Set this object to hold the value 0 and the generic category.

◆ message()

std::string bsl::error_condition::message ( ) const
inline

Return a string describing this object.

◆ operator BoolType()

bsl::error_condition::operator BoolType ( ) const
inline

Return whether the value held by this object is non-zero.

◆ operator=()

template<class ERROR_CONDITION_ENUM >
enable_if< is_error_condition_enum< ERROR_CONDITION_ENUM >::value, error_condition & >::type bsl::error_condition::operator= ( ERROR_CONDITION_ENUM  value)
inline

Set this object to hold the specified value and its category (found from an overloaded call to make_error_condition ).

Note
Note that this operator exists only for those types designated as error conditions via the is_error_condition_enum trait template.

◆ value()

int bsl::error_condition::value ( ) const
inline

Return the value held by this object.


The documentation for this class was generated from the following file: