Flow123d
release_3.0.0-1166-g21aa698
|
#include <exceptions.hh>
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::ExcStream & | val (internal::ExcStream &es) |
static internal::ExcStream & | qval (internal::ExcStream &es) |
static Type const & | ref (ExceptionBase const &e) |
static Type const * | ptr (ExceptionBase const &e) |
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.
Definition at line 214 of file exceptions.hh.
Construction from given value, that has to bee passed to the catch point.
Definition at line 217 of file exceptions.hh.
|
static |
Similar to the previous but returns pointer to the stored value and check nothing.
Definition at line 419 of file exceptions.hh.
|
static |
Stream manipulator for output of quoted value.
Definition at line 394 of file exceptions.hh.
|
static |
Returns reference to stored value in given exception object e
. Check validity of the value.
Definition at line 402 of file exceptions.hh.
|
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.