Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2002-09-28 10:28:31


From: "Alexander Terekhov" <terekhov_at_[hidden]>

> David Abrahams also wrote: <another article>
> [...]
> > > especially if you are trying to
> > > write safe portable code (besides, they could be implemented as
> > "really-C++"
> > > exceptions on a given platform too).
> >
> > In that case, try/catch would be fine.
>
> Nope. You wouldn't really want to ALWAYS have {partial} unwinding on
> std::logic_error

I don't really have a choice.

> (unless you *really really* want it for some reason
> that is beyond my understanding and/or imagination), would you? ;-)

I really wouldn't want std::logic_error in the first place, but if someone
is so foolish as to throw one, there *will* be stack unwinding. That's how
exceptions work (yeah, I know there are conditions under which you can
terminate without unwinding, but that's what assert/abort() is for).

> Frankly, do YOU *also* kinda "doesn't seem to care"(*) with respect
> to thread cancel/exit safety of your code (given that sort of "brain-
> dead" *forced unwinding* IS adopted by many many C++ vendors/platforms
> presently)? What am I missing, Mr. Abrahams?

I don't seem to care so much because most of my code isn't written with
thread safety in mind and doesn't have to run in multithreaded contexts.
I'll worry about that when I have users who need it, knowledge of the
platforms I'm targeting, and an environment in which to test what I've
done.

-----------------------------------------------------------
           David Abrahams * Boost Consulting
dave_at_[hidden] * http://www.boost-consulting.com


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