1 // Boost assertion handler
3 // Defines boost::assertion_failed which is declared in <boost/assert.hpp> but
4 // not defined to be overwritten by user
6 // created 2014 by Christian Herdtweck, Intra2net AG
8 // Distributed under the Boost Software License, Version 1.0.
9 // (See accompanying file LICENSE_1_0.txt or copy at
10 // http://www.boost.org/LICENSE_1_0.txt)
14 #include "boost_assert_handler.h"
18 void assertion_failed(char const * expr, char const * function,
19 char const * file, long line)
21 std::stringstream msg;
22 msg << "BOOST_ASSERT( " << expr << " ) failed for function "
23 << function << " (line " << line << ")!";
24 throw std::runtime_error( msg.str() );