throw_test.cpp 803 B

12345678910111213141516171819202122232425262728
  1. // throw_test.cpp --------------------------------------------------------===========-//
  2. // Copyright Beman Dawes 2010
  3. // Distributed under the Boost Software License, Version 1.0.
  4. // See www.boost.org/LICENSE_1_0.txt
  5. // Library home page is www.boost.org/libs/system
  6. //--------------------------------------------------------------------------------------//
  7. // See dynamic_link_test.cpp comments for use case.
  8. //--------------------------------------------------------------------------------------//
  9. #include <boost/system/system_error.hpp>
  10. #include <boost/config.hpp>
  11. #if defined(THROW_DYN_LINK)
  12. # define EXPORT BOOST_SYMBOL_EXPORT
  13. #else
  14. # define EXPORT
  15. #endif
  16. EXPORT void throw_test()
  17. {
  18. throw boost::system::system_error( 9999, boost::system::system_category(), "boo boo" );
  19. }