X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Utils%2FException.cti;h=a3989080a8b9fafbc052068a5a3ab67518eb15e4;hb=16d94efc2159cba35fc44e5b26747ae0a2ab237b;hp=88aaca89b4fed82bc1dfcbace7e555b97ca9376d;hpb=a1a6c76a214ad1935032826713cabaf9ac57bf07;p=senf.git diff --git a/Utils/Exception.cti b/Utils/Exception.cti index 88aaca8..a398908 100644 --- a/Utils/Exception.cti +++ b/Utils/Exception.cti @@ -26,23 +26,18 @@ //#include "Exception.ih" // Custom includes +#include #define prefix_ inline ///////////////////////////////cti.p/////////////////////////////////////// -template -prefix_ senf::ErrnoException::ErrnoException(std::string const & where) - : SystemException(where,fixed_code) -{} - -// I for some reason need to explicitly define this constructor even though it's defined identically -// to the default version (even though SyntaxException has a custom copy constructor, the -// non-existent std::stringstream copy constructor will be called otherwise). I believe this is a -// g++ bug. -template -prefix_ senf::ErrnoException::ErrnoException(ErrnoException const & other) - : SystemException(other) -{} +template +prefix_ typename boost::enable_if< boost::is_convertible, Exc & >::type +senf::operator<<(Exc const & exc, Arg const & arg) +{ + const_cast(exc).append( boost::lexical_cast(arg) ); + return const_cast(exc); +} /////////////////////////////cti.e/////////////////////////////////////// #undef prefix_