asio 0.3.8rc3 Home | Reference | Tutorial | Examples | Design
Reference Class Hierarchy | Class Index | Member Index

asio::error_code Class Reference

List of all members.

Detailed Description

Class to represent an error code value.


Public Types

typedef int value_type
 The underlying representation of an error code.

Public Member Functions

 error_code ()
 Default constructor.
 error_code (value_type v, error_category c)
 Construct with specific error code and category.
value_type value () const
 Get the error value.
error_category category () const
 Get the error category.
std::string message () const
 Get the message associated with the error.
 operator unspecified_bool_type () const
 Operator returns non-null if there is a non-success error code.
bool operator! () const
 Operator to test if the error represents success.

Friends

bool operator== (const error_code &e1, const error_code &e2)
 Equality operator to compare two error objects.
bool operator!= (const error_code &e1, const error_code &e2)
 Inequality operator to compare two error objects.


Member Typedef Documentation

typedef int asio::error_code::value_type

The underlying representation of an error code.


Constructor & Destructor Documentation

asio::error_code::error_code (  ) 

Default constructor.

asio::error_code::error_code ( value_type  v,
error_category  c 
)

Construct with specific error code and category.


Member Function Documentation

value_type asio::error_code::value (  )  const

Get the error value.

error_category asio::error_code::category (  )  const

Get the error category.

std::string asio::error_code::message (  )  const

Get the message associated with the error.

asio::error_code::operator unspecified_bool_type (  )  const

Operator returns non-null if there is a non-success error code.

bool asio::error_code::operator! (  )  const

Operator to test if the error represents success.


Friends And Related Function Documentation

bool operator== ( const error_code e1,
const error_code e2 
) [friend]

Equality operator to compare two error objects.

bool operator!= ( const error_code e1,
const error_code e2 
) [friend]

Inequality operator to compare two error objects.

asio 0.3.8rc3 Home | Reference | Tutorial | Examples | Design