• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *  Created by Martin on 03/09/2018.
3  *
4  *  Distributed under the Boost Software License, Version 1.0. (See accompanying
5  *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6  */
7 
8 #include "catch_enforce.h"
9 
10 namespace Catch {
11 #if defined(CATCH_CONFIG_DISABLE_EXCEPTIONS) && !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS_CUSTOM_HANDLER)
12     [[noreturn]]
throw_exception(std::exception const & e)13     void throw_exception(std::exception const& e) {
14         Catch::cerr() << "Catch will terminate because it needed to throw an exception.\n"
15                       << "The message was: " << e.what() << '\n';
16         std::terminate();
17     }
18 #endif
19 } // namespace Catch;
20