sbuild::custom_error< T > Class Template Reference

Custom error. More...

#include <sbuild-custom-error.h>

Inheritance diagram for sbuild::custom_error< T >:

Inheritance graph
[legend]
Collaboration diagram for sbuild::custom_error< T >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef T error_type
typedef std::map< error_type,
const char * > 
map_type

Public Member Functions

 custom_error (error_type error)
 The constructor.
 custom_error (std::string const &detail, error_type error)
 The constructor.
 custom_error (std::string const &detail)
 The constructor.
 custom_error (error_type error, int error_number)
 The constructor.
 custom_error (std::string const &detail, error_type error, int error_number)
 The constructor.
 custom_error (std::string const &detail, int error_number)
 The constructor.
 custom_error (error_type error, std::string const &error_string)
 The constructor.
 custom_error (std::string const &detail, error_type error, std::string const &error_string)
 The constructor.
 custom_error (std::string const &detail, std::string const &error_string)
 The constructor.
virtual ~custom_error () throw ()
 The destructor.

Static Private Member Functions

static const char * get_error (error_type error)
 Get a translated error string.
static std::string format_error (std::string const &detail, error_type error)
 Format an error message.
static std::string format_error (std::string const &detail, error_type error, int error_number)
 Format an error message.
static std::string format_error (std::string const &detail, int error_number)
 Format an error message.
static std::string format_error (std::string const &detail, error_type error, std::string const &error_string)
 Format an error message.
static std::string format_error (std::string const &detail, std::string const &error_string)
 Format an error message.

Static Private Attributes

static map_type error_strings
 Mapping between error code and string.

Detailed Description

template<typename T>
class sbuild::custom_error< T >

Custom error.


Member Typedef Documentation

template<typename T>
typedef T sbuild::custom_error< T >::error_type

template<typename T>
typedef std::map<error_type,const char *> sbuild::custom_error< T >::map_type


Constructor & Destructor Documentation

template<typename T>
sbuild::custom_error< T >::custom_error ( error_type  error  )  [inline]

The constructor.

Parameters:
error the error code.

template<typename T>
sbuild::custom_error< T >::custom_error ( std::string const &  detail,
error_type  error 
) [inline]

The constructor.

Parameters:
detail the details of the error.
error the error code.

template<typename T>
sbuild::custom_error< T >::custom_error ( std::string const &  detail  )  [inline]

The constructor.

Parameters:
detail the details of the error.

template<typename T>
sbuild::custom_error< T >::custom_error ( error_type  error,
int  error_number 
) [inline]

The constructor.

Parameters:
error the error code.
error_number the error number.

template<typename T>
sbuild::custom_error< T >::custom_error ( std::string const &  detail,
error_type  error,
int  error_number 
) [inline]

The constructor.

Parameters:
detail the details of the error.
error the error code.
error_number the error number.

template<typename T>
sbuild::custom_error< T >::custom_error ( std::string const &  detail,
int  error_number 
) [inline]

The constructor.

Parameters:
detail the details of the error.
error_number the error number.

template<typename T>
sbuild::custom_error< T >::custom_error ( error_type  error,
std::string const &  error_string 
) [inline]

The constructor.

Parameters:
error the error code.
error_string the error string.

template<typename T>
sbuild::custom_error< T >::custom_error ( std::string const &  detail,
error_type  error,
std::string const &  error_string 
) [inline]

The constructor.

Parameters:
detail the details of the error.
error the error code.
error_string the error string.

template<typename T>
sbuild::custom_error< T >::custom_error ( std::string const &  detail,
std::string const &  error_string 
) [inline]

The constructor.

Parameters:
detail the details of the error.
error_string the error string.

template<typename T>
virtual sbuild::custom_error< T >::~custom_error (  )  throw () [inline, virtual]

The destructor.


Member Function Documentation

template<typename T>
static std::string sbuild::custom_error< T >::format_error ( std::string const &  detail,
std::string const &  error_string 
) [static, private]

Format an error message.

Parameters:
detail the details of the error.
error_string the error string.
Returns:
a translated error message.

template<typename T>
static std::string sbuild::custom_error< T >::format_error ( std::string const &  detail,
error_type  error,
std::string const &  error_string 
) [static, private]

Format an error message.

Parameters:
detail the details of the error.
error the error code.
error_string the error string.
Returns:
a translated error message.

template<typename T>
static std::string sbuild::custom_error< T >::format_error ( std::string const &  detail,
int  error_number 
) [static, private]

Format an error message.

Parameters:
detail the details of the error.
error_number the error number.
Returns:
a translated error message.

template<typename T>
static std::string sbuild::custom_error< T >::format_error ( std::string const &  detail,
error_type  error,
int  error_number 
) [static, private]

Format an error message.

Parameters:
detail the details of the error.
error the error code.
error_number the error number.
Returns:
a translated error message.

template<typename T>
static std::string sbuild::custom_error< T >::format_error ( std::string const &  detail,
error_type  error 
) [static, private]

Format an error message.

Parameters:
error the error code.
detail the details of the error.
Returns:
a translated error message.

template<typename T>
static const char* sbuild::custom_error< T >::get_error ( error_type  error  )  [static, private]

Get a translated error string.

Parameters:
error the error code.
Returns:
a translated error string.


Member Data Documentation

template<typename T>
map_type sbuild::custom_error< T >::error_strings [static, private]

Mapping between error code and string.


The documentation for this class was generated from the following file:
Generated on Mon Jun 26 12:55:20 2006 for schroot by  doxygen 1.4.7