Boost logo

Boost Users :

Subject: [Boost-users] {exception][boost::throw_exception][BOOST_NO_EXCEPTIONS] implications
From: Jeff Flinn (Jeffrey.Flinn_at_[hidden])
Date: 2013-10-28 11:22:27


The project I've joined [ab]uses BOOST_NO_EXCEPTIONS in 1.55b as a means
to intercept exceptions thrown via boost::throw_exception() and
translate them to the project's single exception type derived from
std::exception, leaving me a bit queasy.

That queasiness is reinforced by

#ifdef BOOST_NO_EXCEPTIONS
#error This header requires exception handling to be enabled.
#endif

in ...\boost_1_55_0b1\boost\exception\detail\exception_ptr.hpp. This
implies that BOOST_NO_EXCEPTIONS is used for more that just allowing
client code to supply it's own throw_exception.

Does boost and/or C++ provide a better customization point to safely
translate exceptions thrown by boost?

(note: we're using vs2013, generally the latest gcc, and clang)

Thanks, Jeff


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net