mirror of
https://github.com/boostorg/detail.git
synced 2025-07-31 21:04:27 +02:00
Added support for compilers with no exception handling support.
[SVN r12758]
This commit is contained in:
@@ -60,10 +60,13 @@ namespace boost
|
|||||||
int result = 0; // quiet compiler warnings
|
int result = 0; // quiet compiler warnings
|
||||||
bool exception_thrown = true; // avoid setting result for each excptn type
|
bool exception_thrown = true; // avoid setting result for each excptn type
|
||||||
|
|
||||||
|
#ifndef BOOST_NO_EXCEPTIONS
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
#endif
|
||||||
result = function_object();
|
result = function_object();
|
||||||
exception_thrown = false;
|
exception_thrown = false;
|
||||||
|
#ifndef BOOST_NO_EXCEPTIONS
|
||||||
}
|
}
|
||||||
|
|
||||||
// As a result of hard experience with strangely interleaved output
|
// As a result of hard experience with strangely interleaved output
|
||||||
@@ -120,6 +123,7 @@ namespace boost
|
|||||||
|
|
||||||
catch ( ... )
|
catch ( ... )
|
||||||
{ detail::report_exception( out, "unknown exception", "" ); }
|
{ detail::report_exception( out, "unknown exception", "" ); }
|
||||||
|
#endif // BOOST_NO_EXCEPTIONS
|
||||||
|
|
||||||
if ( exception_thrown ) result = boost::exit_exception_failure;
|
if ( exception_thrown ) result = boost::exit_exception_failure;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user