Flow123d  release_3.0.0-1106-ga3b2e4c
Public Types | Public Member Functions | Static Public Member Functions | List of all members
EI< Tag, Type > Class Template Reference

#include <exceptions.hh>

Inheritance diagram for EI< Tag, Type >:
Inheritance graph
[legend]
Collaboration diagram for EI< Tag, Type >:
Collaboration graph
[legend]

Public Types

typedef boost::error_info< Tag, Type > ErrorInfo
 

Public Member Functions

 EI (Type const &value)
 Construction from given value, that has to bee passed to the catch point. More...
 

Static Public Member Functions

static internal::ExcStreamval (internal::ExcStream &es)
 
static internal::ExcStreamqval (internal::ExcStream &es)
 
static Type const & ref (ExceptionBase const &e)
 
static Type const * ptr (ExceptionBase const &e)
 

Detailed Description

template<class Tag, class Type>
class EI< Tag, Type >

This class should not be used directly but through macro TYPEDEF_ERR_INFO. It is derived from boost::error_info<tag, type> and similarly as its parent it is tailored for passing a value of type Type from the throw point to the catch point. Compared to boost::error_info it provides manipulators val and qval which can by used in formating exception message to the ExcStream. The first manipulator evaluates directly to the output of the stored value, while qval puts the output into single quotas.

The static function ref can be used when you want to extract and output some particular information from the passed value. However, if no value is given at throw point this function simply aborts. There is probably no way how to make the check and still keep flexibility in manipulation with the result of ref function.

For usage see documentation of TYPEDEF_ERR_INFO mecro.

Definition at line 212 of file exceptions.hh.

Member Typedef Documentation

template<class Tag , class Type >
typedef boost::error_info< Tag, Type> EI< Tag, Type >::ErrorInfo

Definition at line 214 of file exceptions.hh.

Constructor & Destructor Documentation

template<class Tag , class Type >
EI< Tag, Type >::EI ( Type const &  value)
inline

Construction from given value, that has to bee passed to the catch point.

Definition at line 217 of file exceptions.hh.

Member Function Documentation

template<class Tag , class Type >
Type const * EI< Tag, Type >::ptr ( ExceptionBase const &  e)
static

Similar to the previous but returns pointer to the stored value and check nothing.

Definition at line 419 of file exceptions.hh.

template<class Tag , class Type >
internal::ExcStream & EI< Tag, Type >::qval ( internal::ExcStream es)
static

Stream manipulator for output of quoted value.

Definition at line 394 of file exceptions.hh.

template<class Tag , class Type >
Type const & EI< Tag, Type >::ref ( ExceptionBase const &  e)
static

Returns reference to stored value in given exception object e. Check validity of the value.

Definition at line 402 of file exceptions.hh.

template<class Tag , class Type >
internal::ExcStream & EI< Tag, Type >::val ( internal::ExcStream es)
static

Stream manipulator used to output the stored value. We have to use special stream ExcStream, that has overloaded << operator in order to support manipulators 'val' and 'qval'.

Definition at line 385 of file exceptions.hh.


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