Boost logo

Boost Users :

Subject: [Boost-users] [Exceptions] Boost exception relationship with std exception & streams
From: joel falcou (joel.falcou_at_[hidden])
Date: 2010-06-20 06:07:14


I'm about to use boost.exception in a library which may require to be built
in environnement where using std is eitehr impossible or has huge penalty
one may want to avoid.

My main idea was to use the BOOST_THROW_EXCEPTION and the error_info to
build
the diagnostic infos into exception class then:
- if BOOST_NO_EXCEPTIONS is not set, process normally
- if BOOST_NO_EXCEPTIONS is set, then jump into a throw_exception
function that just
stream diagnsotic_info to cerr or some such
- if BOOST_NO_EXCEPTIONS and NT2_NO_STREAM is set, jump to a
throw_exception that
fprintf the diagnostic_info to stderr

My question is: how deeply std elements ar eintegrated in
boost::exception and is this kind of
scheme workable with current version ?


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