Boost logo

Boost :

From: Eric Woodruff (Eric.Woodruff_at_[hidden])
Date: 2002-08-17 12:29:54


Peter,

I can't accept the idea that the user always has to modify the throw points
(even though boost::throw_exception will be available and can easily do all
of the wrapping). Sometimes that isn't possible (for things like third party
frameworks). Grantid, that the user already has to construct something
compatible with boost::function0 to give to their thread.

We can provide a function0 wrapper that will wrap a listed set of exceptions
for them. We can also provide a third thread policy besides the
no_exceptions and the throw_exceptions policy. wrap_exceptions<> can do this
wrapping for them but they will have to explicitly list the exceptions to
wrap (the old style).

----- Original Message -----
From: Peter Dimov
Newsgroups: gmane.comp.lib.boost.devel
Sent: Friday, 2002:August:16 11:13 AM
Subject: Re: Re: shared_ptr inheritance relationship

From: "Eric Woodruff" <Eric.Woodruff_at_[hidden]>
> What?
>
> Peter, how can you catch an std::exception& and then write throw
> make_transportable_exception(std::logic_error()); The type is unknown
unless
> we can change how it was thrown and that is not possible.

make_transportable_exception(std::logic_error()) returns a
wrapped_exception<std::logic_error>, which derives from both
std::logic_error and transportable_exception.

Therefore, a catch clause that would handle std::logic_error can handle
wrapped_exception<std::logic_error>, too.

If you mean that we can't catch an arbitrary exception thrown by user code,
wrap it in a wrapped_exception<> and rethrow, yes, but we cannot put it in a
shared_ptr<> either. The users are still required to modify their throw
points.

_______________________________________________
Unsubscribe & other changes:
http://lists.boost.org/mailman/listinfo.cgi/boost


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