|
Boost : |
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2006-08-09 14:23:47
Pavel Vozenilek wrote:
> The explicit support for a "exception transformer"
> inside boost::exception is not needed (visiting
> all stored data is a different thing).
>
> So my arguing is OT in this regard.
Yes, we were discussing how and if enumerating info stored in
boost::exception should be supported.
I think that instead of enumerating info, we need two other functions:
1. The ability to copy the contained info in one boost::exception to another
boost::exception, for folks like you who want to translate exceptions. I
could support the following syntax:
class my_exception: public boost::exception { };
class translated_exception: public boost::exception { };
catch( my_exception & x )
{
throw translated_exception() << x;
}
2. The ability to dump all info stored in boost::exception objects, for
debugging purposes. Something like:
boost::exception & x;
std::string info( x.what() ); //get a string of all info stored in
boost::exception.
Is this alright? Does anyone still think that it is necessary to support
enumeration of the info contained in boost::exception?
--Emil
P.S. The full documentation for Boost Exception is here:
http://www.revergestudios.com/boost-exception/boost-exception.htm
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk