Boost logo

Boost-Commit :

From: emil_at_[hidden]
Date: 2008-04-30 17:45:00


Author: emildotchevski
Date: 2008-04-30 17:45:00 EDT (Wed, 30 Apr 2008)
New Revision: 44954
URL: http://svn.boost.org/trac/boost/changeset/44954

Log:
Integration of Boost Exception in boost::throw_exception().
Text files modified:
   trunk/boost/throw_exception.hpp | 9 +++++++++
   1 files changed, 9 insertions(+), 0 deletions(-)

Modified: trunk/boost/throw_exception.hpp
==============================================================================
--- trunk/boost/throw_exception.hpp (original)
+++ trunk/boost/throw_exception.hpp 2008-04-30 17:45:00 EDT (Wed, 30 Apr 2008)
@@ -23,6 +23,11 @@
 
 #ifdef BOOST_NO_EXCEPTIONS
 # include <exception>
+#else
+# ifndef BOOST_EXCEPTION_DISABLE
+# include <boost/exception/enable_current_exception.hpp>
+# include <boost/exception/enable_error_info.hpp>
+# endif
 #endif
 
 namespace boost
@@ -36,7 +41,11 @@
 
 template<class E> inline void throw_exception(E const & e)
 {
+#ifndef BOOST_EXCEPTION_DISABLE
+ throw enable_current_exception(enable_error_info(e));
+#else
     throw e;
+#endif
 }
 
 #endif


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk