|
Boost : |
From: Janek Kozicki (janek_listy_at_[hidden])
Date: 2006-11-15 12:07:27
Peter Dimov said: (by the date of Wed, 15 Nov 2006 15:54:14 +0200)
> e.dismiss();
why this? destructor of e does the work. No need to e.dismiss()
Dave pointed out that std::uncaught_exception() inside e's destructor
can check the conditions upon which the destructor is called and to
the necessary work depending on it.
> void read_file( std::string const & fn )
> {
> try{..}
> catch( boost::exception & x ){..}
> }
>
> I prefer the second.
it's just a matter of preference, so perhaps both ways should work.
-- Janek Kozicki |
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk