thrust
Classes | Functions
System Diagnostics

Classes

struct  thrust::system::is_error_code_enum< T >
 
struct  thrust::system::is_error_condition_enum< T >
 
struct  thrust::system::is_error_condition_enum< errc::errc_t >
 
class  thrust::system::error_category
 The class error_category serves as a base class for types used to identify the source and encoding of a particular category of error code. Classes may be derived from error_category to support categories of errors in addition to those defined in the C++ International Standard. More...
 
class  thrust::system::error_code
 The class error_code describes an object used to hold error code values, such as those originating from the operating system or other low-level application program interfaces. More...
 
class  thrust::system::error_condition
 The class error_condition describes an object used to hold values identifying error conditions. More...
 
class  thrust::system::system_error
 The class system_error describes an exception object used to report error conditions that have an associated error_code. Such error conditions typically originate from the operating system or other low-level application program interfaces. More...
 

Functions

const error_category & thrust::system::generic_category (void)
 
const error_category & thrust::system::system_category (void)
 
error_code thrust::system::make_error_code (errc::errc_t e)
 
bool thrust::system::operator< (const error_code &lhs, const error_code &rhs)
 
template<typename charT , typename traits >
std::basic_ostream< charT,
traits > & 
thrust::system::operator<< (std::basic_ostream< charT, traits > &os, const error_code &ec)
 
error_condition thrust::system::make_error_condition (errc::errc_t e)
 
bool thrust::system::operator< (const error_condition &lhs, const error_condition &rhs)
 
bool thrust::system::operator== (const error_code &lhs, const error_code &rhs)
 
bool thrust::system::operator== (const error_code &lhs, const error_condition &rhs)
 
bool thrust::system::operator== (const error_condition &lhs, const error_code &rhs)
 
bool thrust::system::operator== (const error_condition &lhs, const error_condition &rhs)
 
bool thrust::system::operator!= (const error_code &lhs, const error_code &rhs)
 
bool thrust::system::operator!= (const error_code &lhs, const error_condition &rhs)
 
bool thrust::system::operator!= (const error_condition &lhs, const error_code &rhs)
 
bool thrust::system::operator!= (const error_condition &lhs, const error_condition &rhs)
 
 thrust::system::system_error::system_error (error_code ec, const std::string &what_arg)
 
 thrust::system::system_error::system_error (error_code ec, const char *what_arg)
 
 thrust::system::system_error::system_error (error_code ec)
 
 thrust::system::system_error::system_error (int ev, const error_category &ecat, const std::string &what_arg)
 
 thrust::system::system_error::system_error (int ev, const error_category &ecat, const char *what_arg)
 
 thrust::system::system_error::system_error (int ev, const error_category &ecat)
 
virtual thrust::system::system_error::~system_error (void) throw ()
 
const error_code & thrust::system::system_error::code (void) const throw ()
 
const char * thrust::system::system_error::what (void) const throw ()
 

Detailed Description

Function Documentation

const error_code& thrust::system::system_error::code ( void  ) const
throw (
)
inline

Returns an object encoding the error.

Returns
ec or error_code(ev, ecat), from the constructor, as appropriate.
const error_category& thrust::system::generic_category ( void  )
inline
Returns
A reference to an object of a type derived from class error_category.
Note
The object's default_error_condition and equivalent virtual functions shall behave as specified for the class error_category. The object's name virtual function shall return a pointer to the string "generic".
error_code thrust::system::make_error_code ( errc::errc_t  e)
inline
Returns
error_code(static_cast<int>(e), generic_category())
error_condition thrust::system::make_error_condition ( errc::errc_t  e)
inline
Returns
error_condition(static_cast<int>(e), generic_category()).
bool thrust::system::operator!= ( const error_code &  lhs,
const error_code &  rhs 
)
inline
Returns
!(lhs == rhs)
bool thrust::system::operator!= ( const error_code &  lhs,
const error_condition &  rhs 
)
inline
Returns
!(lhs == rhs)
bool thrust::system::operator!= ( const error_condition &  lhs,
const error_code &  rhs 
)
inline
Returns
!(lhs == rhs)
bool thrust::system::operator!= ( const error_condition &  lhs,
const error_condition &  rhs 
)
inline
Returns
!(lhs == rhs)
bool thrust::system::operator< ( const error_code &  lhs,
const error_code &  rhs 
)
inline
Returns
lhs.category() < rhs.category() || lhs.category() == rhs.category() && lhs.value() < rhs.value().
bool thrust::system::operator< ( const error_condition &  lhs,
const error_condition &  rhs 
)
inline
Returns
lhs.category() < rhs.category() || lhs.category() == rhs.category() && lhs.value() < rhs.value().
template<typename charT , typename traits >
std::basic_ostream<charT,traits>& thrust::system::operator<< ( std::basic_ostream< charT, traits > &  os,
const error_code &  ec 
)

Effects: os << ec.category().name() << ':' << ec.value().

bool thrust::system::operator== ( const error_code &  lhs,
const error_code &  rhs 
)
inline
Returns
lhs.category() == rhs.category() && lhs.value() == rhs.value().
bool thrust::system::operator== ( const error_code &  lhs,
const error_condition &  rhs 
)
inline
Returns
lhs.category().equivalent(lhs.value(), rhs) || rhs.category().equivalent(lhs,rhs.value()).
bool thrust::system::operator== ( const error_condition &  lhs,
const error_code &  rhs 
)
inline
Returns
rhs.category().equivalent(lhs.value(), lhs) || lhs.category().equivalent(rhs, lhs.value()).
bool thrust::system::operator== ( const error_condition &  lhs,
const error_condition &  rhs 
)
inline
Returns
lhs.category() == rhs.category() && lhs.value() == rhs.value()
const error_category& thrust::system::system_category ( void  )
inline
Returns
A reference to an object of a type derived from class error_category.
Note
The object's equivalent virtual functions shall behave as specified for class error_category. The object's name virtual function shall return a pointer to the string "system". The object's default_error_condition virtual function shall behave as follows:

If the argument ev corresponds to a POSIX errno value posv, the function shall return error_condition(ev,generic_category()). Otherwise, the function shall return error_condition(ev,system_category()). What constitutes correspondence for any given operating system is unspecified.

thrust::system::system_error::system_error ( error_code  ec,
const std::string &  what_arg 
)
inline

Constructs an object of class system_error.

Parameters
ecThe value returned by code().
what_argA string to include in the result returned by what().
Postcondition
code() == ec.
std::string(what()).find(what_arg) != string::npos.
thrust::system::system_error::system_error ( error_code  ec,
const char *  what_arg 
)
inline

Constructs an object of class system_error.

Parameters
ecThe value returned by code().
what_argA string to include in the result returned by what().
Postcondition
code() == ec.
std::string(what()).find(what_arg) != string::npos.
thrust::system::system_error::system_error ( error_code  ec)
inline

Constructs an object of class system_error.

Parameters
ecThe value returned by code().
Postcondition
code() == ec.
thrust::system::system_error::system_error ( int  ev,
const error_category ecat,
const std::string &  what_arg 
)
inline

Constructs an object of class system_error.

Parameters
evThe error value used to create an error_code.
ecatThe error_category used to create an error_code.
what_argA string to include in the result returned by what().
Postcondition
code() == error_code(ev, ecat).
std::string(what()).find(what_arg) != string::npos.
thrust::system::system_error::system_error ( int  ev,
const error_category ecat,
const char *  what_arg 
)
inline

Constructs an object of class system_error.

Parameters
evThe error value used to create an error_code.
ecatThe error_category used to create an error_code.
what_argA string to include in the result returned by what().
Postcondition
code() == error_code(ev, ecat).
std::string(what()).find(what_arg) != string::npos.
thrust::system::system_error::system_error ( int  ev,
const error_category ecat 
)
inline

Constructs an object of class system_error.

Parameters
evThe error value used to create an error_code.
ecatThe error_category used to create an error_code.
Postcondition
code() == error_code(ev, ecat).
const char* thrust::system::system_error::what ( void  ) const
throw (
)
inline

Returns a human-readable string indicating the nature of the error.

Returns
a string incorporating code().message() and the arguments supplied in the constructor.
virtual thrust::system::system_error::~system_error ( void  )
throw (
)
inlinevirtual

Destructor does not throw.