libtasks Documentation  1.6
tasks::error_base Class Reference

A helper class for basic error reporting. More...

#include <error_base.h>

Inheritance diagram for tasks::error_base:
Collaboration diagram for tasks::error_base:

Public Member Functions

 error_base ()
 
virtual ~error_base ()
 
bool error () const
 Return true if an error occured. More...
 
tasks_error error_code () const
 Return the error code. More...
 
const std::string & error_message () const
 Return the error message. More...
 
int sys_errno () const
 Return the errno if available. More...
 
std::string sys_errno_str () const
 Return the errno description if available. More...
 
const tasks_exceptionexception () const
 Return the underlying exception object. More...
 
void set_exception (tasks_exception &e)
 Set an exception to report an error. More...
 
void reset_error ()
 Reset the error state. More...
 

Private Attributes

tasks_exception m_exception
 

Detailed Description

A helper class for basic error reporting.

Definition at line 18 of file error_base.h.

Constructor & Destructor Documentation

tasks::error_base::error_base ( )
inline

Definition at line 20 of file error_base.h.

virtual tasks::error_base::~error_base ( )
inlinevirtual

Definition at line 21 of file error_base.h.

Member Function Documentation

bool tasks::error_base::error ( ) const
inline

Return true if an error occured.

Definition at line 24 of file error_base.h.

Here is the call graph for this function:

Here is the caller graph for this function:

tasks_error tasks::error_base::error_code ( ) const
inline

Return the error code.

Definition at line 29 of file error_base.h.

Here is the call graph for this function:

const std::string& tasks::error_base::error_message ( ) const
inline

Return the error message.

Definition at line 34 of file error_base.h.

Here is the call graph for this function:

const tasks_exception& tasks::error_base::exception ( ) const
inline

Return the underlying exception object.

Definition at line 49 of file error_base.h.

Here is the caller graph for this function:

void tasks::error_base::reset_error ( )
inline

Reset the error state.

Definition at line 59 of file error_base.h.

Here is the call graph for this function:

void tasks::error_base::set_exception ( tasks_exception e)
inline

Set an exception to report an error.

Definition at line 54 of file error_base.h.

Here is the caller graph for this function:

int tasks::error_base::sys_errno ( ) const
inline

Return the errno if available.

Definition at line 39 of file error_base.h.

Here is the call graph for this function:

Here is the caller graph for this function:

std::string tasks::error_base::sys_errno_str ( ) const
inline

Return the errno description if available.

Definition at line 44 of file error_base.h.

Here is the call graph for this function:

Member Data Documentation

tasks_exception tasks::error_base::m_exception
private

Definition at line 64 of file error_base.h.


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