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
8#include <boost/config.hpp>
9
10#if !defined( BOOST_NO_EXCEPTIONS )
11# error This program requires exception handling disabled.
12#endif
13
14#include <boost/throw_exception.hpp>
15#include <stdlib.h>
16
17class my_exception: public std::exception { };
18
19namespace
20boost
21 {
22 void
23 throw_exception( std::exception const & )
24 {
25 exit(status: 0);
26 }
27 }
28
29int
30main()
31 {
32 boost::throw_exception(e: my_exception());
33 return 1;
34 }
35

source code of boost/libs/exception/test/4-throw_exception_no_both_test.cpp