Boost logo

Boost :

From: Pavel Vozenilek (pavel_vozenilek_at_[hidden])
Date: 2006-08-07 20:18:28


"Emil Dotchevski" wrote:

> http://www.revergestudios.com/boost-exception/boost-exception.html
>
> It is also possible to extend the interface to support enumeration of the
> exception info stored in boost::exception objects, but my personal
> preference is to first collect more feedback from people using the
> library,
> because I'm not sure if this enumeration is needed in practice. Brad King
> illustrated this idea in his earlier post:
>
> http://article.gmane.org/gmane.comp.lib.boost.devel/146322
>

I believe this functionality should be present
and will be used extensively at the top level
of an application.

There should be also ability to support
visitation of exception objects.
Imagine situation:

 try {
     ....
 } catch (boost::exception& e) {
     e << ....;

     // now some exceptions could be handled
     // and some need to be passed up
     ????

The ??? could be typeswitch or it could
be a visitor object passed into the exception.
The visitor would be able to throw original
or new exception or handle the situation.
The visitor could be separated, reused
and is more dynamic than a typeswitch.

/Pavel

Just FYI: on
http://www.nwcpp.org/Downloads/2006/The_Power_of_None.ppt
is slide show from Andrei Alexandrescu and Petru Margineanu
suggesting capability to employ either exceptions or local
error handling at will.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk