System Diagnostics

template <typename T> struct thrust::system::is_error_code_enum;
template <typename T> struct thrust::system::is_error_condition_enum;
struct thrust::system::is_error_condition_enum< errc::errc_t >;
/* 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. */class thrust::system::error_category;
/* 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. */class thrust::system::error_code;
/* The class error_condition describes an object used to hold values identifying error conditions. */class thrust::system::error_condition;
/* 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. */class thrust::system::system_error;
const error_category & generic_category();
const error_category & system_category();
error_code make_error_code(cuda::errc::errc_t e);
bool operator<(const error_code & lhs,   const error_code & rhs);
template <typename charT,   typename traits> std::basic_ostream< charT, traits > & operator<<(std::basic_ostream< charT, traits > & os,   const error_code & ec);
error_condition make_error_condition(cuda::errc::errc_t e);
bool operator<(const error_condition & lhs,   const error_condition & rhs);
bool operator==(const error_code & lhs,   const error_code & rhs);
bool operator==(const error_code & lhs,   const error_condition & rhs);
bool operator==(const error_condition & lhs,   const error_code & rhs);
bool operator==(const error_condition & lhs,   const error_condition & rhs);
bool operator!=(const error_code & lhs,   const error_code & rhs);
bool operator!=(const error_code & lhs,   const error_condition & rhs);
bool operator!=(const error_condition & lhs,   const error_code & rhs);
bool operator!=(const error_condition & lhs,   const error_condition & rhs);
const error_code & code() const;
const char * what() const;

Member Classes

Struct thrust::system::is_error_code_enum

Inherits From: thrust::detail::false_type

Struct thrust::system::is_error_condition_enum

Inherits From: thrust::detail::false_type

Struct thrust::system::is_error_condition_enum< errc::errc_t >

Inherits From: thrust::detail::true_type

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.

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.

Class thrust::system::error_condition

The class error_condition describes an object used to hold values identifying error conditions.

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.

Inherits From: std::runtime_error

Functions

Function generic_category

const error_category & generic_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".

Returns: A reference to an object of a type derived from class error_category.

Function system_category

const error_category & system_category();

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.

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:

Returns: A reference to an object of a type derived from class error_category.

Function make_error_code

error_code make_error_code(cuda::errc::errc_t e); Returns:

Function operator<

bool operator<(const error_code & lhs,   const error_code & rhs); Returns: lhs.category() < rhs.category() || lhs.category() == rhs.category() && lhs.value() < rhs.value().

Function operator<<

template <typename charT,   typename traits> std::basic_ostream< charT, traits > & operator<<(std::basic_ostream< charT, traits > & os,   const error_code & ec); Effects: os << ec.category().name() << ':' << ec.value().

Function make_error_condition

error_condition make_error_condition(cuda::errc::errc_t e); Returns:

Function operator<

bool operator<(const error_condition & lhs,   const error_condition & rhs); Returns: lhs.category() < rhs.category() || lhs.category() == rhs.category() && lhs.value() < rhs.value().

Function operator==

bool operator==(const error_code & lhs,   const error_code & rhs); Returns: lhs.category() == rhs.category() && lhs.value() == rhs.value().

Function operator==

bool operator==(const error_code & lhs,   const error_condition & rhs); Returns: lhs.category().equivalent(lhs.value(), rhs) || rhs.category().equivalent(lhs,rhs.value()).

Function operator==

bool operator==(const error_condition & lhs,   const error_code & rhs); Returns: rhs.category().equivalent(lhs.value(), lhs) || lhs.category().equivalent(rhs, lhs.value()).

Function operator==

bool operator==(const error_condition & lhs,   const error_condition & rhs); Returns: lhs.category() == rhs.category() && lhs.value() == rhs.value()

Function operator!=

bool operator!=(const error_code & lhs,   const error_code & rhs); Returns: !(lhs == rhs)

Function operator!=

bool operator!=(const error_code & lhs,   const error_condition & rhs); Returns: !(lhs == rhs)

Function operator!=

bool operator!=(const error_condition & lhs,   const error_code & rhs); Returns: !(lhs == rhs)

Function operator!=

bool operator!=(const error_condition & lhs,   const error_condition & rhs); Returns: !(lhs == rhs)

Function system_error

system_error(error_code ec,   const std::string & what_arg); Constructs an object of class system_error.

Function Parameters:

  • ec The value returned by code().
  • what_arg A string to include in the result returned by what().

Postconditions:

  • code() == ec.
  • std::string(what()).find(what_arg) != string::npos.

Function system_error

system_error(error_code ec,   const char * what_arg); Constructs an object of class system_error.

Function Parameters:

  • ec The value returned by code().
  • what_arg A string to include in the result returned by what().

Postconditions:

  • code() == ec.
  • std::string(what()).find(what_arg) != string::npos.

Function system_error

system_error(error_code ec); Constructs an object of class system_error.

Function Parameters: ec: The value returned by code().

Postconditions: code() == ec.

Function system_error

system_error(int ev,   const error_category & ecat,   const std::string & what_arg); Constructs an object of class system_error.

Function Parameters:

Postconditions:

  • code() == error_code(ev, ecat).
  • std::string(what()).find(what_arg) != string::npos.

Function system_error

system_error(int ev,   const error_category & ecat,   const char * what_arg); Constructs an object of class system_error.

Function Parameters:

Postconditions:

  • code() == error_code(ev, ecat).
  • std::string(what()).find(what_arg) != string::npos.

Function system_error

system_error(int ev,   const error_category & ecat); Constructs an object of class system_error.

Function Parameters:

Postconditions: code() == error_code(ev, ecat).

Function ~system_error

virtual ~system_error(); Destructor does not throw.

Function code

const error_code & code() const; Returns an object encoding the error.

Returns: ec or error_code(ev, ecat), from the constructor, as appropriate.

Function what

const char * what() const; Returns a human-readable string indicating the nature of the error.

Returns: a string incorporating code().message() and the arguments supplied in the constructor.