sbuild  1.7.1
Public Types | Public Member Functions | List of all members
sbuild::parse_error< T > Class Template Reference

Parse error. More...

#include <parse-error.h>

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

Public Types

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

Public Member Functions

template<typename C >
 parse_error (C const &context, error_type error)
 The constructor. More...
 
template<typename D >
 parse_error (error_type error, D const &detail)
 The constructor. More...
 
template<typename D >
 parse_error (size_t line, error_type error, D const &detail)
 The constructor. More...
 
template<typename D >
 parse_error (size_t line, const std::string &group, error_type error, D const &detail)
 The constructor. More...
 
template<typename D >
 parse_error (size_t line, const std::string &group, const std::string &key, error_type error, D const &detail)
 The constructor. More...
 
template<typename D >
 parse_error (const std::string &group, error_type error, D const &detail)
 The constructor. More...
 
template<typename D >
 parse_error (const std::string &group, const std::string &key, error_type error, D const &detail)
 The constructor. More...
 
template<typename C >
 parse_error (C const &context, const std::runtime_error &error)
 The constructor. More...
 
 parse_error (size_t line, const std::runtime_error &error)
 The constructor. More...
 
 parse_error (size_t line, const std::string &group, const std::runtime_error &error)
 The constructor. More...
 
 parse_error (size_t line, const std::string &group, const std::string &key, const std::runtime_error &error)
 The constructor. More...
 
 parse_error (const std::string &group, const std::runtime_error &error)
 The constructor. More...
 
 parse_error (const std::string &group, const std::string &key, const std::runtime_error &error)
 The constructor. More...
 
- Public Member Functions inherited from sbuild::error< T >
 error (const std::string &error)
 The constructor. More...
 
 error (const std::string &error, const std::string &reason)
 The constructor. More...
 
virtual ~error () throw ()
 The destructor.
 
template<typename A , typename B , typename C , typename D , typename E , typename F >
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)
 
template<typename A , typename B , typename C , typename D , typename E , typename F >
std::string format_error (A const &context1, B const &context2, C const &context3, const std::runtime_error &error, D const &detail1, E const &detail2, F const &detail3)
 
template<typename A >
void add_detail (boost::format &fmt, A const &value)
 
template<typename A , typename B , typename C , typename R , typename D , typename E , typename F >
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)
 
template<typename A >
void add_reason (std::string &reason, A const &value)
 
- 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. More...
 
std::string const & get_reason () const
 Get the reason for the error. More...
 
void set_reason (const std::string &reason)
 Set the reason for the error. More...
 

Additional Inherited Members

- Protected Member Functions inherited from sbuild::error_base
 error_base (const std::string &error)
 The constructor. More...
 
 error_base (const std::string &error, const std::string &reason)
 The constructor. More...
 
- 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. More...
 
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, const std::runtime_error &error, D const &detail1, E const &detail2, F const &detail3)
 Format an error message. More...
 
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. More...
 
static void add_detail (boost::format &fmt, const std::nullptr_t &value)
 Add detail to format string. More...
 
template<typename A >
static void add_detail (boost::format &fmt, A const &value)
 Add detail to format string. More...
 
template<typename A >
static void add_reason (std::string &reason, A const &value)
 Add reason to reason string. More...
 

Detailed Description

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

Parse error.

Constructor & Destructor Documentation

template<typename T >
template<typename C >
sbuild::parse_error< T >::parse_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::parse_error< T >::parse_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 >
sbuild::parse_error< T >::parse_error ( size_t  line,
error_type  error,
D const &  detail 
)
inline

The constructor.

Parameters
linethe line the error occurred on.
errorthe error code.
detailthe details of the error.
template<typename T >
template<typename D >
sbuild::parse_error< T >::parse_error ( size_t  line,
const std::string &  group,
error_type  error,
D const &  detail 
)
inline

The constructor.

Parameters
linethe line the error occurred on.
groupthe group the error occurred within.
errorthe error code.
detailthe details of the error.
template<typename T >
template<typename D >
sbuild::parse_error< T >::parse_error ( size_t  line,
const std::string &  group,
const std::string &  key,
error_type  error,
D const &  detail 
)
inline

The constructor.

Parameters
linethe line the error occurred on.
groupthe group the error occurred within.
keythe key the error occurred within.
errorthe error code.
detailthe details of the error.
template<typename T >
template<typename D >
sbuild::parse_error< T >::parse_error ( const std::string &  group,
error_type  error,
D const &  detail 
)
inline

The constructor.

Parameters
groupthe group the error occurred within.
errorthe error code.
detailthe details of the error.
template<typename T >
template<typename D >
sbuild::parse_error< T >::parse_error ( const std::string &  group,
const std::string &  key,
error_type  error,
D const &  detail 
)
inline

The constructor.

Parameters
groupthe group the error occurred within.
keythe key the error occurred within.
errorthe error code.
detailthe details of the error.
template<typename T >
template<typename C >
sbuild::parse_error< T >::parse_error ( C const &  context,
const std::runtime_error &  error 
)
inline

The constructor.

Parameters
contextthe context of the error.
errorthe error.
template<typename T >
sbuild::parse_error< T >::parse_error ( size_t  line,
const std::runtime_error &  error 
)
inline

The constructor.

Parameters
linethe line the error occurred on.
errorthe error.
template<typename T >
sbuild::parse_error< T >::parse_error ( size_t  line,
const std::string &  group,
const std::runtime_error &  error 
)
inline

The constructor.

Parameters
linethe line the error occurred on.
groupthe group the error occurred within.
errorthe error.
template<typename T >
sbuild::parse_error< T >::parse_error ( size_t  line,
const std::string &  group,
const std::string &  key,
const std::runtime_error &  error 
)
inline

The constructor.

Parameters
linethe line the error occurred on.
groupthe group the error occurred within.
keythe key the error occurred within.
errorthe error.
template<typename T >
sbuild::parse_error< T >::parse_error ( const std::string &  group,
const std::runtime_error &  error 
)
inline

The constructor.

Parameters
groupthe group the error occurred within.
errorthe error.
template<typename T >
sbuild::parse_error< T >::parse_error ( const std::string &  group,
const std::string &  key,
const std::runtime_error &  error 
)
inline

The constructor.

Parameters
groupthe group the error occurred within.
keythe key the error occurred within.
errorthe error.

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