From 15a5375b14d26d69f123fa473c1472b1ef119972 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Fri, 8 Feb 2002 12:44:43 +0000 Subject: [PATCH] Added support for compilers with no exception handling support. [SVN r12758] --- include/boost/detail/catch_exceptions.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/boost/detail/catch_exceptions.hpp b/include/boost/detail/catch_exceptions.hpp index 6be97c4..8597113 100644 --- a/include/boost/detail/catch_exceptions.hpp +++ b/include/boost/detail/catch_exceptions.hpp @@ -60,10 +60,13 @@ namespace boost int result = 0; // quiet compiler warnings bool exception_thrown = true; // avoid setting result for each excptn type +#ifndef BOOST_NO_EXCEPTIONS try { +#endif result = function_object(); exception_thrown = false; +#ifndef BOOST_NO_EXCEPTIONS } // As a result of hard experience with strangely interleaved output @@ -120,6 +123,7 @@ namespace boost catch ( ... ) { detail::report_exception( out, "unknown exception", "" ); } +#endif // BOOST_NO_EXCEPTIONS if ( exception_thrown ) result = boost::exit_exception_failure;