• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2019 Hans Dembinski
2 //
3 // Distributed under the Boost Software License, Version 1.0.
4 // (See accompanying file LICENSE_1_0.txt
5 // or copy at http://www.boost.org/LICENSE_1_0.txt)
6 
7 #ifdef BOOST_NO_EXCEPTIONS
8 
9 #include <boost/assert/source_location.hpp>
10 #include <cstdlib> // std::abort
11 #include <exception>
12 #include <iostream>
13 
14 namespace boost {
15 
16 // dummy implementation for user-defined function from boost/throw_exception.hpp
throw_exception(std::exception const & e,boost::source_location const & l)17 inline void throw_exception(std::exception const& e, boost::source_location const& l) {
18   std::cerr << l.file_name() << ":" << l.line() << ":" << l.column() << ": exception in '"
19             << l.function_name() << " \"" << e.what() << "\"" << std::endl;
20   std::abort();
21 }
22 
23 } // namespace boost
24 
25 #endif
26