// Boost assertion handler // // Defines boost::assertion_failed which is declared in but // not defined to be overwritten by user // // created 2014 by Christian Herdtweck, Intra2net AG // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #include #include #include "boost_assert_handler.h" namespace boost { void assertion_failed(char const * expr, char const * function, char const * file, long line) { std::stringstream msg; msg << "BOOST_ASSERT( " << expr << " ) failed for function " << function << " (line " << line << ")!"; throw std::runtime_error( msg.str() ); } }