• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #define BOOST_EXCEPTION_DISABLE
7 #include <boost/throw_exception.hpp>
8 #include <boost/detail/lightweight_test.hpp>
9 
10 class my_exception: public std::exception { };
11 
12 int
main()13 main()
14     {
15     try
16         {
17         boost::throw_exception(my_exception());
18         BOOST_ERROR("boost::throw_exception failed to throw.");
19         }
20     catch(
21     my_exception & )
22         {
23         }
24     catch(
25     ... )
26         {
27         BOOST_ERROR("boost::throw_exception malfunction.");
28         }
29     return boost::report_errors();
30     }
31