1 //Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc. 2 3 //Distributed under the Boost Software License, Version 1.0. (See accompanying 4 //file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 6 #include <boost/exception/exception.hpp> 7 #include <boost/detail/lightweight_test.hpp> 8 9 class 10 test_exception: 11 public boost::exception 12 { 13 }; 14 15 void test_throw()16test_throw() 17 { 18 throw test_exception(); 19 } 20 21 int main()22main() 23 { 24 try 25 { 26 test_throw(); 27 BOOST_TEST(false); 28 } 29 catch( 30 test_exception & ) 31 { 32 BOOST_TEST(true); 33 } 34 return boost::report_errors(); 35 } 36