mirror of
https://github.com/boostorg/exception.git
synced 2025-07-01 15:01:08 +02:00
fixed compile errors, removed tabs as required.
[SVN r44114]
This commit is contained in:
@ -11,74 +11,74 @@ typedef boost::error_info<struct tag_test,int> test;
|
||||
|
||||
struct
|
||||
test_boost_exception:
|
||||
boost::exception
|
||||
{
|
||||
};
|
||||
boost::exception
|
||||
{
|
||||
};
|
||||
|
||||
void
|
||||
throw_boost_exception()
|
||||
{
|
||||
throw test_boost_exception() << test(42);
|
||||
}
|
||||
{
|
||||
throw test_boost_exception() << test(42);
|
||||
}
|
||||
|
||||
void
|
||||
throw_unknown_exception()
|
||||
{
|
||||
struct
|
||||
test_exception:
|
||||
std::exception
|
||||
{
|
||||
};
|
||||
throw test_exception();
|
||||
}
|
||||
{
|
||||
struct
|
||||
test_exception:
|
||||
std::exception
|
||||
{
|
||||
};
|
||||
throw test_exception();
|
||||
}
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
try
|
||||
{
|
||||
throw_boost_exception();
|
||||
}
|
||||
catch(
|
||||
boost::exception & x )
|
||||
{
|
||||
boost::exception_ptr ep=boost::clone_exception(x);
|
||||
try
|
||||
{
|
||||
rethrow_exception(ep);
|
||||
}
|
||||
catch(
|
||||
boost::unknown_exception & x )
|
||||
{
|
||||
BOOST_TEST( 42==*boost::get_error_info<test>(x) );
|
||||
}
|
||||
catch(
|
||||
... )
|
||||
{
|
||||
BOOST_TEST(false);
|
||||
}
|
||||
}
|
||||
try
|
||||
{
|
||||
throw_unknown_exception();
|
||||
}
|
||||
catch(
|
||||
std::exception & x )
|
||||
{
|
||||
boost::exception_ptr ep=boost::clone_exception(x);
|
||||
try
|
||||
{
|
||||
rethrow_exception(ep);
|
||||
}
|
||||
catch(
|
||||
boost::unknown_exception & )
|
||||
{
|
||||
}
|
||||
catch(
|
||||
... )
|
||||
{
|
||||
BOOST_TEST(false);
|
||||
}
|
||||
}
|
||||
return boost::report_errors();
|
||||
}
|
||||
{
|
||||
try
|
||||
{
|
||||
throw_boost_exception();
|
||||
}
|
||||
catch(
|
||||
boost::exception & x )
|
||||
{
|
||||
boost::exception_ptr ep=boost::clone_exception(x);
|
||||
try
|
||||
{
|
||||
rethrow_exception(ep);
|
||||
}
|
||||
catch(
|
||||
boost::unknown_exception & x )
|
||||
{
|
||||
BOOST_TEST( 42==*boost::get_error_info<test>(x) );
|
||||
}
|
||||
catch(
|
||||
... )
|
||||
{
|
||||
BOOST_TEST(false);
|
||||
}
|
||||
}
|
||||
try
|
||||
{
|
||||
throw_unknown_exception();
|
||||
}
|
||||
catch(
|
||||
std::exception & x )
|
||||
{
|
||||
boost::exception_ptr ep=boost::clone_exception(x);
|
||||
try
|
||||
{
|
||||
rethrow_exception(ep);
|
||||
}
|
||||
catch(
|
||||
boost::unknown_exception & )
|
||||
{
|
||||
}
|
||||
catch(
|
||||
... )
|
||||
{
|
||||
BOOST_TEST(false);
|
||||
}
|
||||
}
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
Reference in New Issue
Block a user