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_NO_EXCEPTIONS 7 #include <boost/throw_exception.hpp> 8 #include <stdlib.h> 9 10 class my_exception: public std::exception { }; 11 12 namespace 13 boost 14 { 15 void throw_exception(std::exception const &)16 throw_exception( std::exception const & ) 17 { 18 exit(0); 19 } 20 } 21 22 int main()23main() 24 { 25 boost::throw_exception(my_exception()); 26 return 1; 27 } 28