Wefts::Error Class Reference
[Throwable exceptions]

#include <wefts_error.h>

Inheritance diagram for Wefts::Error:

Inheritance graph
[legend]
List of all members.

Detailed Description

Generic error class This is meant to be overloaded by specific error classes below.


Public Member Functions

 Error (int code=0, std::string descr="Generic low-level error")
 Create the error.

int osCode () const
 Return a numeric OS-dependant code.

virtual const std::string & description () const
 Returns a descriptive string about what the error is.

virtual const std::string className () const
 Returns the name of the class.


Private Attributes

int m_osCode
std::string m_descr

Friends

std::ostream & operator<< (std::ostream &stream, Error &err)
 Serializes the error.


Constructor & Destructor Documentation

Wefts::Error::Error int  code = 0,
std::string  descr = "Generic low-level error"
 

Create the error.

Parameters:
code OS dependant code (if available)
descr a description of the error that can be human readable.


Member Function Documentation

virtual const std::string Wefts::Error::className  )  const [inline, virtual]
 

Returns the name of the class.

Reimplemented in Wefts::NotJoinableError, Wefts::InvalidError, Wefts::InitError, and Wefts::StartError.

virtual const std::string& Wefts::Error::description  )  const [inline, virtual]
 

Returns a descriptive string about what the error is.

int Wefts::Error::osCode  )  const [inline]
 

Return a numeric OS-dependant code.

This can be useful for debugging application running in a given environment


Friends And Related Function Documentation

std::ostream& operator<< std::ostream &  stream,
Error err
[friend]
 

Serializes the error.

Use this operator to display what kind of error has happened


Member Data Documentation

std::string Wefts::Error::m_descr [private]
 

int Wefts::Error::m_osCode [private]
 


The documentation for this class was generated from the following files:
Generated on Tue Oct 5 14:57:02 2004 for Wefts by doxygen 1.3.7