sbuild  1.6.0
Public Types | Public Member Functions
sbuild::custom_error< T > Class Template Reference

Custom error. More...

#include <sbuild-custom-error.h>

+ Inheritance diagram for sbuild::custom_error< T >:
+ Collaboration diagram for sbuild::custom_error< T >:

List of all members.

Public Types

typedef error< T >::error_type error_type
 The enum type providing the error codes for this type.
- Public Types inherited from sbuild::error< T >
typedef std::map< error_type,
const char * > 
map_type
 Mapping between error code and error description.

Public Member Functions

 custom_error (error_type error)
 The constructor.
template<typename C >
 custom_error (C const &context, error_type error)
 The constructor.
template<typename D >
 custom_error (error_type error, D const &detail)
 The constructor.
template<typename D , typename E >
 custom_error (error_type error, D const &detail, E const &detail2)
 The constructor.
template<typename D , typename E , typename F >
 custom_error (error_type error, D const &detail, E const &detail2, F const &detail3)
 The constructor.
template<typename C , typename D >
 custom_error (C const &context, error_type error, D const &detail)
 The constructor.
template<typename C , typename D , typename E >
 custom_error (C const &context, error_type error, D const &detail, E const &detail2)
 The constructor.
template<typename C , typename D , typename E >
 custom_error (C const &context1, D const &context2, error_type error, E const &detail)
 The constructor.
template<typename C , typename D , typename E , typename F >
 custom_error (C const &context1, D const &context2, error_type error, E const &detail, F const &detail2)
 The constructor.
 custom_error (std::runtime_error const &error)
 The constructor.
 custom_error (error_base const &error)
 The constructor.
template<typename C >
 custom_error (C const &context, std::runtime_error const &error)
 The constructor.
template<typename C >
 custom_error (C const &context, error_base const &error)
 The constructor.
virtual ~custom_error () throw ()
 The destructor.
- Public Member Functions inherited from sbuild::error< T >
 error (std::string const &error)
 The constructor.
 error (std::string const &error, std::string const &reason)
 The constructor.
virtual ~error () throw ()
 The destructor.
- Public Member Functions inherited from sbuild::error_base
virtual ~error_base () throw ()
 The destructor.
virtual const char * why () const throw ()
 Get the reason for the error.
std::string const & get_reason () const
 Get the reason for the error.
void set_reason (std::string const &reason)
 Set the reason for the error.

Additional Inherited Members

- Static Protected Member Functions inherited from sbuild::error< T >
template<typename A , typename B , typename C , typename D , typename E , typename F >
static std::string format_error (A const &context1, B const &context2, C const &context3, error_type error, D const &detail1, E const &detail2, F const &detail3)
 Format an error message.
template<typename A , typename B , typename C , typename D , typename E , typename F >
static std::string format_error (A const &context1, B const &context2, C const &context3, std::runtime_error const &error, D const &detail1, E const &detail2, F const &detail3)
 Format an error message.
template<typename A , typename B , typename C , typename R , typename D , typename E , typename F >
static std::string format_reason (A const &context1, B const &context2, C const &context3, R const &error, D const &detail1, E const &detail2, F const &detail3)
 Format an reason string.
template<typename A >
static void add_detail (boost::format &fmt, A const &value)
 Add detail to format string.
template<typename A >
static void add_reason (std::string &reason, A const &value)
 Add reason to reason string.

Detailed Description

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

Custom error.


Constructor & Destructor Documentation

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

The constructor.

Parameters:
errorthe error code.
template<typename T >
template<typename C >
sbuild::custom_error< T >::custom_error ( C const &  context,
error_type  error 
)
inline

The constructor.

Parameters:
contextthe context of the error.
errorthe error code.
template<typename T >
template<typename D >
sbuild::custom_error< T >::custom_error ( error_type  error,
D const &  detail 
)
inline

The constructor.

Parameters:
errorthe error code.
detailthe details of the error.
template<typename T >
template<typename D , typename E >
sbuild::custom_error< T >::custom_error ( error_type  error,
D const &  detail,
E const &  detail2 
)
inline

The constructor.

Parameters:
errorthe error code.
detailthe details of the error.
detail2additional details of the error.
template<typename T >
template<typename D , typename E , typename F >
sbuild::custom_error< T >::custom_error ( error_type  error,
D const &  detail,
E const &  detail2,
F const &  detail3 
)
inline

The constructor.

Parameters:
errorthe error code.
detailthe details of the error.
detail2additional details of the error.
detail3additional details of the error.
template<typename T >
template<typename C , typename D >
sbuild::custom_error< T >::custom_error ( C const &  context,
error_type  error,
D const &  detail 
)
inline

The constructor.

Parameters:
contextthe context of the error.
errorthe error code.
detailthe details of the error.
template<typename T >
template<typename C , typename D , typename E >
sbuild::custom_error< T >::custom_error ( C const &  context,
error_type  error,
D const &  detail,
E const &  detail2 
)
inline

The constructor.

Parameters:
contextthe context of the error.
errorthe error code.
detailthe details of the error.
detail2additional details of the error.
template<typename T >
template<typename C , typename D , typename E >
sbuild::custom_error< T >::custom_error ( C const &  context1,
D const &  context2,
error_type  error,
E const &  detail 
)
inline

The constructor.

Parameters:
context1the context of the error.
context2additional context of the error.
errorthe error code.
detailthe details of the error.
template<typename T >
template<typename C , typename D , typename E , typename F >
sbuild::custom_error< T >::custom_error ( C const &  context1,
D const &  context2,
error_type  error,
E const &  detail,
F const &  detail2 
)
inline

The constructor.

Parameters:
context1the context of the error.
context2additional context of the error.
errorthe error code.
detailthe details of the error.
detail2additional details of the error.
template<typename T >
sbuild::custom_error< T >::custom_error ( std::runtime_error const &  error)
inline

The constructor.

Parameters:
errorthe error.
template<typename T >
sbuild::custom_error< T >::custom_error ( error_base const &  error)
inline

The constructor.

Parameters:
errorthe error.
template<typename T >
template<typename C >
sbuild::custom_error< T >::custom_error ( C const &  context,
std::runtime_error const &  error 
)
inline

The constructor.

Parameters:
contextthe context of the error.
errorthe error.
template<typename T >
template<typename C >
sbuild::custom_error< T >::custom_error ( C const &  context,
error_base const &  error 
)
inline

The constructor.

Parameters:
contextthe context of the error.
errorthe error.

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