throw_exception.cpp 379 B

1234567891011121314151617181920
  1. // Copyright 2019 Peter Dimov.
  2. //
  3. // Distributed under the Boost Software License, Version 1.0.
  4. // http://www.boost.org/LICENSE_1_0.txt
  5. #include <boost/config.hpp>
  6. #include <exception>
  7. #include <cstdio>
  8. namespace boost
  9. {
  10. void throw_exception( std::exception const & e )
  11. {
  12. std::fprintf( stderr, "Exception: %s\n", e.what() );
  13. std::terminate();
  14. }
  15. } // namespace boost