|
Boost : |
From: David Abrahams (dave_at_[hidden])
Date: 2002-08-13 15:01:13
From: "Victor A. Wagner, Jr." <vawjr_at_[hidden]>
> >
> >Even that's not enough; you need to know the order in which to look for
> >them:
> >
> >try { something(); }
> >catch(std::exception) {
> > std::cout << "x";
> >}
> >catch(std::bad_alloc) {
> > std::cout << "y";
> >}
> >
> >Never prints "y".
>
> of course. the texts I read on exceptions made this quite clear. I don't
> see this as any sort of a "problem".
Yes, but the user won't be writing that in this case. It's important to
recognize the limitations of any such system. What does the user actually
need to get right in order to make it work? He must supply a complete list
of every concrete exception type that may escape the thread sorted in
reverse topographical order.
-Dave
-----------------------------------------------------------
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