Boost logo

Boost :

From: Alexander Terekhov (terekhov_at_[hidden])
Date: 2003-09-29 06:48:53


PMFJI,

John Maddock wrote:
>
> > The explanation is IMHO a little vague, because the two following
> > scenarios seem to conform to this mode:
> >
> > 1. No try and catch constructs allowed, but stack unwinding can result
> > from some other event (SEH exceptions, something like that.)
>
> No, SEH in the absense of C++ exceptions are just a longjump - no stack
> unwinding takes place,

Many modern systems implement longjump via "forced unwinding"
("Forced unwinding is a single-phase process (phase 2 of the normal
exception-handling process").

> the same with POSIX signals.

Many modern systems allow raising of an exception (and that will
trigger "normal exception-handling process") for any *synchronous*
signal/trap. SEH in the absense of C++ stack is nothing but well
known (from the days of MVS and VMS) 2-phase "condition handling"
thing that allows continuation. It is widely accepted that, in
general, continuations "aren't worth the trouble". As for the
rest, well, as Butenhof once wrote on c.p.t. "...I suspect it's
one of those things that's too subtle to see until you've got
experience with the alternatives; and probably nobody had really
perceived the power of a good 2-phase exception system that's
used correctly. ;-)".

regards,
alexander.

--
2-phase EH? expected_exception?T?()? Dave A knows. Just ask him.

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