powerd++  0.4.4
Public Member Functions | Public Attributes | List of all members
sys::sc_error< Domain > Struct Template Reference

Can be thrown by syscall function wrappers if the function returned with an error. More...

#include <error.hpp>

Public Member Functions

 operator int () const
 Cast to integer. More...
 
const char * c_str () const
 Return c style string. More...
 

Public Attributes

int error
 The errno set by the native C function.
 

Detailed Description

template<class Domain>
struct sys::sc_error< Domain >

Can be thrown by syscall function wrappers if the function returned with an error.

This is its own type for easy catching, but implicitly casts to int for easy comparison.

Template Parameters
DomainA type marking the domain the error comes from, e.g. sys::ctl::error

Member Function Documentation

◆ c_str()

template<class Domain >
const char* sys::sc_error< Domain >::c_str ( ) const
inline

Return c style string.

Returns
A string representation of the error

◆ operator int()

template<class Domain >
sys::sc_error< Domain >::operator int ( ) const
inline

Cast to integer.

Returns
The errno code

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