mirror of
https://github.com/boostorg/exception.git
synced 2025-07-12 12:06:33 +02:00
fixed compile errors, removed tabs as required.
[SVN r44114]
This commit is contained in:
@ -8,42 +8,42 @@
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
|
||||
namespace
|
||||
{
|
||||
typedef boost::error_info<struct tag_test_int,int> test_int;
|
||||
{
|
||||
typedef boost::error_info<struct tag_test_int,int> test_int;
|
||||
|
||||
void
|
||||
throw_wrapper()
|
||||
{
|
||||
try
|
||||
{
|
||||
boost::exception_test::throw_length_error();
|
||||
}
|
||||
catch(
|
||||
boost::exception & x )
|
||||
{
|
||||
x << test_int(42);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
void
|
||||
throw_wrapper()
|
||||
{
|
||||
try
|
||||
{
|
||||
boost::exception_test::throw_length_error();
|
||||
}
|
||||
catch(
|
||||
boost::exception & x )
|
||||
{
|
||||
x << test_int(42);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
try
|
||||
{
|
||||
throw_wrapper();
|
||||
BOOST_TEST(false);
|
||||
}
|
||||
catch(
|
||||
std::exception & x )
|
||||
{
|
||||
BOOST_TEST( 42==*boost::get_error_info<test_int>(x) );
|
||||
}
|
||||
catch(
|
||||
... )
|
||||
{
|
||||
BOOST_TEST(false);
|
||||
}
|
||||
return boost::report_errors();
|
||||
}
|
||||
{
|
||||
try
|
||||
{
|
||||
throw_wrapper();
|
||||
BOOST_TEST(false);
|
||||
}
|
||||
catch(
|
||||
std::exception & x )
|
||||
{
|
||||
BOOST_TEST( 42==*boost::get_error_info<test_int>(x) );
|
||||
}
|
||||
catch(
|
||||
... )
|
||||
{
|
||||
BOOST_TEST(false);
|
||||
}
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
Reference in New Issue
Block a user