Boost logo

Boost :

From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2006-07-05 17:23:52


Oleg,

> boost::throw_<read_error>();
>
> It would be clearly seen in code and understandable.

Note that the current boost::failed function template does not throw an
exception; it returns an unnamed temporary, which is then used in the
throw-expression, like this:

throw failed<foo>();

The reason is to allow exception info to be added tirectly in the
throw-expression:

throw failed<foo>() << info1() << info2() .... ;

I completely agree that "failed" is not a good word for this, but I couldn't
come up with anything better.

--Emil


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