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/config.hpp> |
7 | |
8 | #if defined( BOOST_NO_EXCEPTIONS ) |
9 | # error This program requires exception handling. |
10 | #endif |
11 | |
12 | #include "visibility_test_lib.hpp" |
13 | #include <boost/exception/get_error_info.hpp> |
14 | #include <boost/detail/lightweight_test.hpp> |
15 | |
16 | void BOOST_SYMBOL_IMPORT hidden_throw(); |
17 | |
18 | int |
19 | main() |
20 | { |
21 | try |
22 | { |
23 | hidden_throw(); |
24 | BOOST_TEST(false); |
25 | } |
26 | catch( |
27 | my_exception & e ) |
28 | { |
29 | BOOST_TEST(boost::get_error_info<my_info>(e) && *boost::get_error_info<my_info>(e)==42); |
30 | } |
31 | return boost::report_errors(); |
32 | } |
33 |