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